Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Good Day,
I have the requirement to change from a Stacked Bar visual (SUM of Items) to 100% Stacked Bar visual.
I know I can do this via buttons and bookmarks, but for this specific application, my User Group is asking for this to be done via a Slicer Selection (i.e. Select Value or Select % ). Any ideas would be most appreciated.
Thanks and regards,
Solved! Go to Solution.
Hi @rsbin ,
You could do this by using stacked bar chart.
Step1:
Create a table like below and use it as slicer.
Step2:
Create two measures(simple measures as a demonstration).
_sum = SUM('Table'[value])
_percent = SUM('Table'[value])/CALCULATE(SUM('Table'[value]),ALL('Table'))
Step3:
Create another measure and put it in the visual.
_switch = IF(SELECTEDVALUE(slicer[slicer]) = "sum",slicer[_sum], [_percent])
Best Regards,
Jay
Hi @rsbin ,
You could do this by using stacked bar chart.
Step1:
Create a table like below and use it as slicer.
Step2:
Create two measures(simple measures as a demonstration).
_sum = SUM('Table'[value])
_percent = SUM('Table'[value])/CALCULATE(SUM('Table'[value]),ALL('Table'))
Step3:
Create another measure and put it in the visual.
_switch = IF(SELECTEDVALUE(slicer[slicer]) = "sum",slicer[_sum], [_percent])
Best Regards,
Jay
@rsbin , You can change measure in visual using measure slicer. But you can not do the same for axis or visual type.
measure slicer
https://www.youtube.com/watch?v=b9352Vxuj-M
https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/50...
https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slic...
You can create a measure like
divide([measure], calculate([Measure], removefilter(Table[Legend])) )
replace Legend with Legend column and measure with your measure to get % of subtotal
Percent of SubTotal or Total: https://www.youtube.com/watch?v=6jTildcV2ho&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=37
Hello @amitchandak,
Thanks much for the reply. I will review the links and see if I can make something work for me.
Appreciate your time.
Regards,
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |