Forum Discussion
Power BI Calculation
Hi,
Question regarding a calculation in Power BI. The need is to calculate 'Total Hours of Overtime for a given period'. Input variables:
1. Time = date range that is selected through a Slicer.
2. Number of resources 'active' also updated based on the dates selected through the Slicer.
3. Activities will for tasks that exclude any form of Leave.
4. Overtime will be any excess hours more than 45 hours for a week (for all 'active' resources).
Looking forward to the forum's response.
Thanks and regards,
Ruan
- Anonymous3 years ago
Hi Anonymous ,
You can refer the following links to get it:
Get the active items count during selected period:
Showing running number of active users (at each given date)
Active Users = CALCULATE ( COUNTROWS ( Table1 ), Table1[StartDate] < MAX ( DimDate[Date] ), Table1[EndDate] > MAX ( DimDate[Date] ) )Overtime calculation:
OT = if([HoursPerWeek]>40,[HoursPerWeek] - 40*[EmployeeCount],BLANK())If the above ones can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
2 Replies
- AlanP514Post Patron
Hi Anonymous
Could you please Elaborate your requirement - AnonymousNot applicable
Hi Anonymous ,
You can refer the following links to get it:
Get the active items count during selected period:
Showing running number of active users (at each given date)
Active Users = CALCULATE ( COUNTROWS ( Table1 ), Table1[StartDate] < MAX ( DimDate[Date] ), Table1[EndDate] > MAX ( DimDate[Date] ) )Overtime calculation:
OT = if([HoursPerWeek]>40,[HoursPerWeek] - 40*[EmployeeCount],BLANK())If the above ones can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards