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
AndyDD_UK
Helper III
Helper III

Help with DAX for missing hours

In table A I have number hours entered by employee, day and activity. Example of table:

 

Employee_id / DateofActivity / Activity (project id) / Hours Spent on Activity / Datetime entered onto timesheet system

 

In table B I have hours expected to work by week by employee_id, example of table:

Employee_id / Standard_hours

123                  40

 

In my Cube I have a measure called 'missinghours_overtime' which is = sum(TableA[HoursSpentActivity]) - sum(TableB[Standard_hours])

 

In Power BI report I can show missinghours_overtime' by employee by week and as a total.

 

Example:

Employee123 shows 10 hours overtime in week 1 and 20 hours missing for week 2, making a total of 10 missing hours.

 

How can I only focus on missing hours, ie have the report show 0 missing hours in week 1 and 20 missing hours in week 2 making a total of 20 missing hours ?

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

Share some data to work with (in a format the can be pasted in an MS Excel file) and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.