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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.