Forum Discussion
100% stack bar percentage calculation
I need help to match the 100% stack bar percentage value with my measure percentage value
In my visual above, the 100% stack bar percentage value is 17.25% but my measure percentage calculation is 2.38%.
What I want is for both to have the same percentage value.
What do I need to do in order to achieve this?
Hi,
If 17.25% is what you want to show, please change the measure [FloorShareTota%] like below.
FloorShareTotal% =
DIVIDE ( [FloorShareTotal], CALCULATE ( [FloorShareTotal], ALL ( dimBrand ) ) )
3 Replies
- Jihwan_Kim
Super User
Hi,
If 17.25% is what you want to show, please change the measure [FloorShareTota%] like below.
FloorShareTotal% =
DIVIDE ( [FloorShareTotal], CALCULATE ( [FloorShareTotal], ALL ( dimBrand ) ) )- RingoSun
Helper II
Oh that worked! But I tried it with my real data and it didn't seem to work 😞
Both must be 15.71% but my measure calculation is showing 2.60%. Although when I try to filter to REFRIGERATOR category then it shows me the correct percentage.
FloorShareTotal% = DIVIDE ( [FloorShareTotal], CALCULATE ([FloorShareTotal], ALLSELECTED(dimSkuSos) ))dimSkuSos basically contains the column which I used as the legend for my stacked bar chart
I cant share my pbix with the real data but I hope you could give me some insight with what I have provided.
Thank you so much!
- Jihwan_Kim
Super User
Hi,
I cannot understand by only seeing the screenshot. What I can suggest for now is, please try to use ALL function instead of ALLSELECTED.