Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
RingoSun
Helper II
Helper II

100% stack bar percentage calculation

I need help to match the 100% stack bar percentage value with my measure percentage value

RingoSun_1-1655651559957.png

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?

 

PBIX

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
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 ) ) )

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

3 REPLIES 3
Jihwan_Kim
Super User
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 ) ) )

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


@Jihwan_Kim 

Oh that worked! But I tried it with my real data and it didn't seem to work 😞

 

RingoSun_0-1655654295140.png

 

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.

RingoSun_1-1655654407045.png

 

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!

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.

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.