Reply
_bs_
Frequent Visitor
Partially syndicated - Outbound

Incorrect Totals

Hello, working on first Power BI report and having issues.

 

The objective is to determine for each Engineer/Resource how many hours and days they are available to work in a calendar month individually and as a overall Team

Table Working Dates is filtered to show working days in the current month

Table Resources is filtered to one Team consisting of 5 Resources.

There is no relationship between them as I expect values to be duplicted per Resource / per row.

 

_bs__0-1732272194170.png

This matix is showing each Resource has 21 days / 168 hours in a month -  this is correct.

The issue is the total, I would like to see 105 days / 840 hours.

_bs__1-1732272628606.png

The Formulas I have tried are:

Working Days = CALCULATE(DISTINCTCOUNT('Working Dates'[Date]),ALL(Resources[Engineer]))
Working Days = COUNTX('Working Dates','Working Dates'[Date])
 
Any suggestions? Thank you

 

 

 

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Syndicated - Outbound

Hi @_bs_ 

Your working days and working hours calculations need to be evaluated for each distinct engineer value and then summed up. To achieve this, try these measures:

SUMX ( VALUES ( data[engineer] ), [working days formula] )

or

SUMX (
    ADDCOLUMNS (
        SUMMARIZE ( data, data[engineer] ),
        "@value", [working days formula]
    ),
    [@value]
)

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

2 REPLIES 2
danextian
Super User
Super User

Syndicated - Outbound

Hi @_bs_ 

Your working days and working hours calculations need to be evaluated for each distinct engineer value and then summed up. To achieve this, try these measures:

SUMX ( VALUES ( data[engineer] ), [working days formula] )

or

SUMX (
    ADDCOLUMNS (
        SUMMARIZE ( data, data[engineer] ),
        "@value", [working days formula]
    ),
    [@value]
)

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Syndicated - Outbound

Thank you @danextian 

I have used the first option and works correctly 😀

avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)