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
harshagraj
Post Partisan
Post Partisan

Stacked Column chart instead of 100% Stacked Chart

Hello all,

 

I am having below problem. 

My requirement is to get a Stacked Column Chart. But When I am using the below calculation the chart is automatically changing to 100% Stacked chart.

I have a table consisting of several columns but i have used fiscal year(2018-2027), region, country in the page level filter.
In Stacked chart axis i have used fiscal year and legend is global_production_segment and values is CAA%

CAA %=
VAR __A = SUM('Table'[CAA])
VAR __B = CALCULATE(SUM(Table[CAA]),ALLSELECTED(Table[global_production_segment]))
RETURN
DIVIDE(__A,__B,0)
I have attached the excel sheet.
My question is why i am getting 100% stacked chart if i use this calculation.
I need barchart like below
harshagraj_0-1627482186300.pngharshagraj_1-1627482239947.png

 

fiscal_year_idglobal_production_segmentCAA
2018A11688
2018B38129
2018CC11261
2018C57286
2018D34644
2018E19550
2018F11310
2018G76055
2019A11062
2019B38350
2019CC11314
2019C57098
2019D37206
2019E21083
2019F13990
2019G71841
2020A10097
2020B33730
2020CC99010
2020C49550
2020D35930
2020E19950
2020F12188
2020G66450
2021A11147
2021B36148
2021CC10841
2021C54241
2021D39602
2021E21553
2021F13067
2021G69230
2022A11170
2022B38177
2022CC11167
2022C62562
2022D46066
2022E25256
2022F15189
2022G71750
2023A10832
2023B37972
2023CC10747
2023C64509
2023D47593
2023E26512
2023F16227
2023G67620
2024A50064
2024B18589
2024CC50918
2024C32395
2024D23802
2024E13524
2024F80224
2024G32339
2025A31525
2025B12082
2025CC31838
2025C21733
2025D15578
2025E87717
2025F51196
2025G20880
2026A31488
2026B12003
2026CC31139
2026C22172
2026D15717
2026E86383
2026F49144
2026G20585
2027A31746
2027B12380
2027CC31248
2027C22308
2027D15786
2027E88100
2027F47490
2027G20364

 

3 REPLIES 3
lbendlin
Super User
Super User

Don't divide - use 'Table'[CAA]  as the value.

 

lbendlin_0-1627508295580.png

 

Hi @lbendlin but i need to show the percentange so I am dividing it.

Then you will always have a 100% stack.

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.