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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
charlie_lugosi
Regular Visitor

Matrix Column total on Measure is not the total of the lines

Created a measure to calculate differences between minimum values and current value of selected items.
WOD =
VAR WMINUSD=CALCULATE(MIN('WO_ISSUE'[BasePriceUSD]),ALLSELECTED('WO_ISSUE'[WO]))
VAR WMINLC=CALCULATE(MIN('WO_ISSUE'[BasePriceLC]),ALLSELECTED('WO_ISSUE'[WO]))
RETURN IF (MIN('CurrencyChoice'[Currency])="US$",SUM('WO_ISSUE'[BasePriceUSD])-WMINUSD,SUM('WO_ISSUE'[BasePriceLC])-WMINLC)
When I apply this into Matrix Columns the row level values are correctly showing the difference between current value and the minimumBOM.png however the column total is not. It is the total of the calculated value (BasePriceUSD or BasePriceLC).
 
Can you please advise me , how to correct this.
 
 
P,S, I'd like to upload my whole PBIX but could not find out how.
2 ACCEPTED SOLUTIONS

@charlie_lugosi 

I modified the measure, please try now:

WOD = 
SUMX(
    VALUES('WO_ISSUE'[Issued]),

        VAR WMINUSD=CALCULATE(MIN('WO_ISSUE'[BasePriceUSD]),ALLSELECTED('WO_ISSUE'[WO]))
        VAR WMINLC=CALCULATE(MIN('WO_ISSUE'[BasePriceLC]),ALLSELECTED('WO_ISSUE'[WO]))
        RETURN  
        IF (MIN('CurrencyChoice'[Currency])="US$",CALCULATE(SUM('WO_ISSUE'[BasePriceUSD]))-WMINUSD,CALCULATE(SUM('WO_ISSUE'[BasePriceLC]))-WMINLC)
)

 

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

@charlie_lugosi 

I took your measure and used SUMX to iterate over WO_ISSUE'[Issued] field values and sum. at line level one value is visible and the measure shows the same value but at the total level, it goes through each value and aggregate. I used CALCULATE to set the context transition as well.

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

5 REPLIES 5
Fowmy
Super User
Super User

@charlie_lugosi 

What do you expect at the total level?

You can save your files in OneDrive, Google Drive, or any other cloud sharing platforms and share the link here.
________________________________________________________________________
Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube, LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Thanks for the instruction, below link for the PBIX file.

BOMCostTrends.pbix 

What I expected that the WOD column total is the total of the underlying rows.

@charlie_lugosi 

I modified the measure, please try now:

WOD = 
SUMX(
    VALUES('WO_ISSUE'[Issued]),

        VAR WMINUSD=CALCULATE(MIN('WO_ISSUE'[BasePriceUSD]),ALLSELECTED('WO_ISSUE'[WO]))
        VAR WMINLC=CALCULATE(MIN('WO_ISSUE'[BasePriceLC]),ALLSELECTED('WO_ISSUE'[WO]))
        RETURN  
        IF (MIN('CurrencyChoice'[Currency])="US$",CALCULATE(SUM('WO_ISSUE'[BasePriceUSD]))-WMINUSD,CALCULATE(SUM('WO_ISSUE'[BasePriceLC]))-WMINLC)
)

 

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

 

Thanks very much, excellent.

Would you  please be kind giving a short explanation?

 

Thanks

@charlie_lugosi 

I took your measure and used SUMX to iterate over WO_ISSUE'[Issued] field values and sum. at line level one value is visible and the measure shows the same value but at the total level, it goes through each value and aggregate. I used CALCULATE to set the context transition as well.

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.

Top Solution Authors
Top Kudoed Authors