Forum Discussion
TOTAL CATEGORY VS SUBCATEGORY
HI ALL,
Please help - i have 2024 projected sales for 3 countires , 5 segments per country. I have 2025 budget as % increment per country per segment.
I added a measure to calculate 2025 budget value by adding 2024 projected sales + 2025 budget value - its coming correct for segment , but total for country is not matching with the subcategory total. please help me.
- Anonymous1 year ago
Thanks for the reply from ryan_mayu and Greg_Deckler , please allow me to provide another insight:
Hi anoomohan ,I created some data:
Are you referring to the fact that the correct value is required for TOTAL for each level in the matrix, you can use IF()+ISINSCOPE() to determine the formula corresponding to the level to which it belongs.
Here are the steps you can follow:
1. Create measure.
Measure = IF( ISINSCOPE('Table'[Group3]),[Incorrect total], IF( ISINSCOPE('Table'[Group2]), SUMX(VALUES('Table'[Group3]),[Incorrect total]), IF( ISINSCOPE('Table'[Group1]), SUMX(ALLEXCEPT('Table','Table'[Group1],'Table'[Group2]),[Incorrect total]), SUMX(ALLEXCEPT('Table','Table'[Group1]),[Incorrect total]) )))2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
4 Replies
- AnonymousNot applicable
Thanks for the reply from ryan_mayu and Greg_Deckler , please allow me to provide another insight:
Hi anoomohan ,I created some data:
Are you referring to the fact that the correct value is required for TOTAL for each level in the matrix, you can use IF()+ISINSCOPE() to determine the formula corresponding to the level to which it belongs.
Here are the steps you can follow:
1. Create measure.
Measure = IF( ISINSCOPE('Table'[Group3]),[Incorrect total], IF( ISINSCOPE('Table'[Group2]), SUMX(VALUES('Table'[Group3]),[Incorrect total]), IF( ISINSCOPE('Table'[Group1]), SUMX(ALLEXCEPT('Table','Table'[Group1],'Table'[Group2]),[Incorrect total]), SUMX(ALLEXCEPT('Table','Table'[Group1]),[Incorrect total]) )))2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- Greg_Deckler
Community Champion
anoomohan 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- anoomohan
Helper III
i need the total on top to display the total of the below rows
- ryan_mayu
Super User
could you pls provide some sample data and expected output?