Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
I'm having an issue while trying to turn the labels of my stacked bar graph into percentage. The point is that the percent have to look up only for to the total of the column and not for the grand total as it does when we select "show value as" > "percentage of grand total"
I googled it, and tried to find some soluction on Microsoft Power BI forum but I couldn't find a soluction. The best that I found was creating the measure of the percent of total to put into the tooltip box so I can see the percentage in the lightbox that show informations of the bar when using the mouse. like this:
The total of the month 2020/05 is 67 and 17 is 25% of it.
The measure %_Total in Dax:
%_Total =
var Total = CALCULATE(DISTINCTCOUNT(Analise_Reativados[Id]),REMOVEFILTERS(Analise_Reativados[Compara_Meses (grupos)]))
var Clientes = DISTINCTCOUNT(Analise_Reativados[Id])
return Clientes/Total
Where Analise_Reativados[Compara_Meses (grupos)] is a group that aggregates through a list.
It should be like this in the end:
But I don't know how to solve it.
Can someone help me?
Thanks!
Solved! Go to Solution.
Hi, @Ncsbr
After testing, if you want to use the column sum as the denominator, the size of the bar chart cannot be kept the same as the original one, because the sum is 100%. Only as shown in the figure.
If you want to keep the size of the bar chart constant, you can only use the total sum as the denominator.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Ncsbr
After testing, if you want to use the column sum as the denominator, the size of the bar chart cannot be kept the same as the original one, because the sum is 100%. Only as shown in the figure.
If you want to keep the size of the bar chart constant, you can only use the total sum as the denominator.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for the support @v-zhangti! Probably I will have to use Python or R code to work with this graph so ;)!