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

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

Reply
ivvan_smo
New Member

Repeating subtotal for a filtered measure

Hi all, 

I wanted to ask, if you could help me with the issue below. 

 

I have similar power pivot with a measure, and I am looking for measure 2 (showing subtotals of the category for each row, but being able to filter in the pivot and measure will adjust):

ContinentCountryCityMeasureMeasure 2 ContinentCountryCityMeasureMeasure 2
EuropeUKLondon300450 EuropeUKLondon300400
EuropeUKLeeds100450 EuropeUKLeeds100400
EuropeUKBirmingham50450 Subtotal  400400
Subtotal  450450-->EuropeItalyRome75305
EuropeItalyRome75305 EuropeItalyPisa80305
EuropeItalyPisa80305 EuropeItalyMilan150305
EuropeItalyMilan150305 Subtotal  305305
Subtotal  305305      

 

I can create measure 2 with using all() and disregarding "City" column in the filter. However, if I filter out city  (as second table) in the pivot, measure 2 will not change as I have already excluded "City" in the filter. Can someone help? 

 

Thanks a lot, 

Ivan

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

@ivvan_smo Not sure if I am 100% following but first, please vote for this idea: https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e

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: https://youtu.be/uXRriTN0cfY
And: https://youtu.be/n4TYhF2ARe8



Follow on LinkedIn
@ 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler , 

thanks a lot, but unfortunately this is not an issue with measure totals (but I have used your advices for other projects earlier, thanks for that :)). 

 

Here the issue is, that I would like to repeat subtotals in each row of my pivot table (using DAX). 

 

For measure 2 (from above) I have used following command: 

measure 2= calculate(sum(table.variable XY), all(table.[city]) - this works perfectly as long as I do not filter in the pivot. As soon as I filter out some city, the measure two does not change to the value of new subtotal (e.g. excluding Birmingham and stay 450). 

Is there some workaround? I guess it has something to do with filters. 

 

Hope now it is more clear. 

 

Thanks, 

I.

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.