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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
frank_becks
New Member

Total working hours per day/week/month per employee

I'm working on a report that displays the total capacity of employee hours per day/week/wonth etc. But having trouble summing the totals. What would be the best approache to get the correct totals for each levels calculated correctly? See the situation below:

 

The following tables are avalilable:

1.png

I've setup a date table and merged the employee- and schedules table to get this model:

 

2.png

 

Adding the fields to a Matrix gives me a correct total hours per day and week, but the totals per month and year are not summed correctly. 

3.png

1 REPLY 1
mahoneypat
Microsoft Employee
Microsoft Employee

Please see this article.

Obtaining accurate totals in DAX - SQLBI

 

You likely want to use this pattern

NewMeasure = SUMX(VALUES(Table[FullName]), [YourMeasure])

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.