Forum Discussion
Coryanthony
3 years agoHelper III
Sum hours based on day, then create new column with IF function
Hello, I want to sum up hours worked base on day, then create a column ($Allowed) base on the sum of hours. $ Allow = CALCULATE(SUM(Timesheet[Number (unit)]), IF(Timesheet[Day of Week] >=0 && ...
- Anonymous3 years ago
Hi Coryanthony ,
This is due to the nature of calculated columns, and you can create a table visual to show.
You can also create a measure.
measure_Allowed = var _sum = CALCULATE(SUM('Table'[number (unit)]),FILTER(ALLEXCEPT('Table','Table'[employee id],'Table'[date]),'Table'[number (unit)])) return IF(_sum>10&&max('Table'[Day of Week])>=0&&MAX('Table'[Day of Week])<=4,20,0)Please refer to my PBIX file.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ashish_Mathur
3 years agoSuper User
Hi,
Show the expected result very clearly. Share the download link of the PBI file.
Coryanthony
3 years agoHelper III
thank you for your input Ashish. I am learning more about community.powerbi.
If you have any suggestion, please feel free to share. Thank you