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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
DaveCor
Helper I
Helper I

Dont include row value in total

Hi folks, 

 

I have to be honest, this has me beaten so I'm really hoping someone here has an idea how to do this

 

Samples table of raw data placed into a single table here for ease of reading

 

Product2019 Returns2019 Sales2020 Returns2020 Sales
Apples59145565112965
Oranges334634858200397835
Bananas3413701421102334
Grapes1251270420119825232
Total54920568483881338366

 

I have the following measure

Returns = 1000000 * DISTINCTCOUNT(returns_table[source_system_id])/SUM(Sales_table[delivery_qty])
 
The above gives me a rate per million of returns. From that I created the following
 
Returns LY = CALCULATE([Returns],DATEADD('Calendar'[Date],-1,YEAR))
Returns YTD = TOTALYTD([Returns],'Calendar'[Date])
Returns Ratio YoY = [Returns YTD]/[Returns LY]
Returns LY Total = CALCULATE([Returns LY], ALL(Product Table[product_family]))
Returns YTD Total = CALCULATE([Returns YTD], ALL(Product Table[product_family]))
 
In a matrix table this gives me a table showing my products and the "return rate" for each and also the overall return rate for the year
ProductReturn YTDReturn LYReturn RatioReturn YTD TotalReturn LY Total
Apples405339340.97267290
Oranges5265030.96267290
Bananas2482040.83267290
Grapes981441.47267290
Total2672901.09267290
 
Here is where I am stuck. What I want to do is create an adjusted set of figures whereby the the figures for each product are removed from the YTD & LY totals allowing me to get an adjusted ratio i.e. the overal total with that product excluded from the total. From the table above it would look something like this. 
 
So the "Adjusted Return YTD Total" for Apples would be the total return rate of all other products excluding Apples. The same then for "Adjusted Return LY Total". 
 
 
ProductReturn YTDReturn LYReturn RatioReturn YTD TotalReturn LY TotalAdjusted RatioAdjusted Return YTD TotalAdjusted Return LY Total
Apples405339340.97267290   
Oranges5265030.96267290   
Bananas2482050.83267290   
Grapes981441.47267290   
Total2672901.09267290   

 

I'm guessing the adjusted ratio would then be a simple measure like this
Adjusted Return Ratio = [Adjusted Returns YTD]/[Adjusted Returns LY]
 
 
1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

@DaveCor 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



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...

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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