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
Jaya
Frequent Visitor

override subtotals in a matrix

Is it possible to override the subtotals in a Power BI matrix so that it does not include a specific item? Something like below where the NY amount is not included in subtotals. TIA.

 

StateBudget
CT500
MA1500
NY1000
Subtotals2000
1 ACCEPTED SOLUTION

 
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

View solution in original post

10 REPLIES 10
smpa01
Super User
Super User

@Jaya try this measure

X= IF(HASONEVALUE('Table 1'[State]),CALCULATE(SUMX('Table 1','Table 1'[Budget])),CALCULATE(SUMX(FILTER('Table 1','Table 1'[State]<>"NY"),'Table 1'[Budget])))
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
Jaya
Frequent Visitor

That works perfect but I want the NY value to be displayed in the matrix though. It should show but do not calculate on subtotals. Thanks so much!

did you try it yet ?

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
Jaya
Frequent Visitor

Yes I did. The value is not counting towards the subtotals which is what I want but I also want the value to show across the NY row.

dsq.PNG

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
Jaya
Frequent Visitor

Below is how the matrix looks on my end

 

StateActualNew
CT500500
MA15001500
NY1000 
Subtotals30002000

 
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
Jaya
Frequent Visitor

Hi,

 

Any ideas about what would I do if the column "Budget" is a measure. I have a measure called "Remaining Balance" which is the actual value minus the budget value. I have used a measure because Budget value comes from a different table. 

 

When I use the DAX you sent it is giving me all incorrect values.

 

TIA,

Jaya
Frequent Visitor

You are the best! Thanks so much!

This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907

 

Also, check out MM3TR&R: https://community.powerbi.com/t5/Quick-Measures-Gallery/Matrix-Measure-Total-Triple-Threat-Rock-amp-...


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.