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
_bs_
New Member

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

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]
)

 










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


Proud to be a Super User!









"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

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]
)

 










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


Proud to be a Super User!









"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.

Thank you @danextian 

I have used the first option and works correctly 😀

Helpful resources

Announcements
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.