Forum Discussion
Top N with Total for all values
- 8 years ago
Hi Anonymous
Try this...
1. This is my sample data.
2. and this is the result after apply TopN (In my case Top 3)
3. The trick for showing the total below the table is the next measure...
Total Quantity = IF ( HASONEVALUE('Top'[Products]); SUM('Top'[Quantity]); CALCULATE(SUM('Top'[Quantity]);ALL('Top'[Products])) )I hope this helps
Regards
BILASolution
Hi Anonymous
Try this...
1. This is my sample data.
2. and this is the result after apply TopN (In my case Top 3)
3. The trick for showing the total below the table is the next measure...
Total Quantity =
IF
(
HASONEVALUE('Top'[Products]);
SUM('Top'[Quantity]);
CALCULATE(SUM('Top'[Quantity]);ALL('Top'[Products]))
)
I hope this helps
Regards
BILASolution
- Anonymous8 years agoNot applicable
Thanks, worked like a charm! :) (although I did have to change your semi-colons ; to commas , )
- OECvargoj8 years agoFrequent Visitor
Any advise for applying this same concept to a pie chart? I would like to show top 5 products by total sales while displaying the % of total for all products. Currently when I display top 5, the % of total is redistributed to only take into consideration the top 5.
- RajGine204 years agoNew Member
Hey, did you find a solution to this problem?
THANKS!!!