Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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