Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hey, I would like to create a Stacked Bar Chart showing in total 100% values and it can be grouped by several categories. I saw it in the following video:
https://www.youtube.com/watch?v=-nqEv2YXLsU
I got it running for one specfic category with the following measure:
Cost % of Total = DIVIDE (
[Cost Amount],
CALCULATE ( SUM ( 'Usage details'[Cost] ), ALLEXCEPT ( 'Usage details', 'Usage details'[MeterCategory] ) )
)
But now having the Parameter slicers where I can switch the categories to something else, this solution doesn't work anymore. Is there any way to keep the Stacked bar chart with at the end 100% as total value but with different grouping from other fields in the table 'Usage details'?
@lkshck , Switch measure based on selection
refer the code here , i switched it for topn
Switch TOPN with Field Parameters: https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f
User | Count |
---|---|
77 | |
74 | |
42 | |
32 | |
28 |
User | Count |
---|---|
99 | |
92 | |
50 | |
47 | |
46 |