Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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
Solved! Go to Solution.
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
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
Hi @Anonymous
Could you please Elaborate your requirement
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 33 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 90 | |
| 78 | |
| 66 | |
| 65 |