Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

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

1 ACCEPTED SOLUTION
Anonymous
Not 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] )
)

Active Employees per Period

Overtime calculation:

overtime calculation

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

View solution in original post

2 REPLIES 2
Anonymous
Not 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] )
)

Active Employees per Period

Overtime calculation:

overtime calculation

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

AlanP514
Post Patron
Post Patron

Hi @Anonymous 

Could you please Elaborate your requirement

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.