eisayev
New member
Hi
My problem is, I have date columns which is start and end dates. In another table I have dates row by row. I merged these two tables and "Table" created in each row depending on Worker. Now I want to sum date ranges but still not successful.
I used such M code but it was not correct.
if [period start] <= Table.Column([NewColumn],"Shift Date") and [Period End] <= Table.Column([NewColumn], "Shift Date") then Table.Column([NewColumn], "Hours Worked") else 0
I could not upload the file because of its size but tried to show problem on picture
Thank you in advance
My problem is, I have date columns which is start and end dates. In another table I have dates row by row. I merged these two tables and "Table" created in each row depending on Worker. Now I want to sum date ranges but still not successful.
I used such M code but it was not correct.
if [period start] <= Table.Column([NewColumn],"Shift Date") and [Period End] <= Table.Column([NewColumn], "Shift Date") then Table.Column([NewColumn], "Hours Worked") else 0
I could not upload the file because of its size but tried to show problem on picture
Thank you in advance