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
emiec
Microsoft Employee
Microsoft Employee

Calculate Measure - Total is Incorrect

I am using the following DAX expression to calculate the difference between Minutes Used and (Ad-hoc + Baseline).  It works.

 

However, when I look at it in table format, image below, the ExcessUsage TOTAL = 863,397,953; which is incorrect.  It should be 54,733,805.  Any suggestions on why this is happening?

 

ExcessUsage =
IF
(
(MAX(Statistics[AssignedMinutes]) - (Reporting[Ad-HocUsage] + Reporting[BaselineUsage]) < 0),
CALCULATE
(
MAX(Statistics[AssignedMinutes]) - (Reporting[Ad-HocUsage] + Reporting[BaselineUsage]),
FILTER
(
Reporting,
SUM(Reporting[Minutes_Used]) > MAX(Statistics[AssignedTokenMinutes])
)
),
BLANK()
)
 
 
Usage.PNG
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Try wrapping your function in SUMX:

SUMX( 
   VALUES( Table [ Column] ),
....

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @emiec 

 

 

Can you please post the raw datasets and pbix in google drive / onedrive and shre the link here to formulate a solution.

 

Cheers

 

CheenuSing

 

Anonymous
Not applicable

Try wrapping your function in SUMX:

SUMX( 
   VALUES( Table [ Column] ),
....
emiec
Microsoft Employee
Microsoft Employee

I ended up writing the following DAX measure and it worked.  Thanks for the suggestion.

 

EU = SUMX(SUMMARIZE(VALUES(Reporting),Reporting[JobEndTime]),[MinutesUsed] - [Base Usage])
emiec
Microsoft Employee
Microsoft Employee

Thanks for the suggestion.  I did try but it didn't work.

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.