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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
emiec
Employee
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
CheenuSing
Community Champion
Community Champion

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

 

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!
Anonymous
Not applicable

Try wrapping your function in SUMX:

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

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

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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