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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
irenelitw629
Helper II
Helper II

100% Stacked Column Chart % Calculation

Hi,

 

This might be a silly question but I could not figure it out . In below sales table, product A is 29.16% of total sales ( $470,993/ $1,615,318)

irenelitw629_2-1680676627146.png

 

However, when I converted to 100% stacked column chart, the % become 27.67%. How is 27.67% calculated? I expect the chart to show 29.16% as per excel. Here is the file https://drive.google.com/file/d/1wzVEJmLtE6kuckDwIgObAIZGaoSjsPIY/view?usp=sharing

 

 

irenelitw629_4-1680676696547.png

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @irenelitw629 ,

 

The problem comes from negative values in your data, and if they are all positive, the results are the same on both sides.

vstephenmsft_0-1682393799306.png

Once the negative value of L is added, the result is different.

31.png

If you want to keep the results displayed in the left table in the Stacked column chart, you can create the following measure.

Measure = var _sum=SUMX(FILTER(ALLSELECTED(data),[Sales Quarter]=MAX('data'[Sales Quarter])&&[Product]=MAX('data'[Product])),[Sales Amount])
var _all=SUMX(ALLSELECTED(data),[Sales Amount])
return DIVIDE(_sum,_all)

Then use the normal Stacked column chart and replace the original value with a measure, which displays the percentage.

32.png

vstephenmsft_2-1682394174816.png

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.           

View solution in original post

5 REPLIES 5
ismailmohamed
New Member

Hi,

I am using the 100% Stacked Bar Chart where in the bar am showing both the count and the percentage also. So, I need to differentiate by using brackets for percentage so that it will be easy to identify by the users.so give me some solution.

ismailmohamed_0-1742280584274.png

 

Anonymous
Not applicable

Hi @irenelitw629 ,

 

The problem comes from negative values in your data, and if they are all positive, the results are the same on both sides.

vstephenmsft_0-1682393799306.png

Once the negative value of L is added, the result is different.

31.png

If you want to keep the results displayed in the left table in the Stacked column chart, you can create the following measure.

Measure = var _sum=SUMX(FILTER(ALLSELECTED(data),[Sales Quarter]=MAX('data'[Sales Quarter])&&[Product]=MAX('data'[Product])),[Sales Amount])
var _all=SUMX(ALLSELECTED(data),[Sales Amount])
return DIVIDE(_sum,_all)

Then use the normal Stacked column chart and replace the original value with a measure, which displays the percentage.

32.png

vstephenmsft_2-1682394174816.png

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.           

DOLEARY85
Resident Rockstar
Resident Rockstar

Hi,

 

it looks like because L is a negative percentage it's throwing off your total % calculation

 

@DOLEARY85 , thanks - anyway to fix it?

Not with that particular chart as all the values add up to 100% if you use the standard stacked column chart it should give you what you need.

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍


Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors