Forum Discussion
Stacked Column Chart Formatting
Hi everyone,
I'm working with a stacked column chart in Power BI where:
- X-axis has a hierarchy: Year → Type
- Y-axis shows values from a measure
- Legend is based on Type
Currently, the chart displays Year and Type-1, Type-2, etc., on the X-axis, but I already have a legend at the top of the visual, so I’d prefer not to repeat those labels on the axis.
Here’s what I’m trying to achieve:
- Keep the stacked bar for Type-12, which includes Type-1 + Type-2
- Do not show separate values for Type-1 and Type-2 within Type-12. I want to display just the combined value (Type-1 + Type-2) as a single stacked bar
Expected something like below:
If anyone has suggestions on how to format or model this properly, I’d really appreciate your help!
You can access the Power BI file here
Thanks in advance!
Thank you for this clear post and for providing data
Done, here the result
my file is here
https://drive.google.com/drive/folders/14HuWjOKld9A5x-oHacplyMRa6J5rNyjd?usp=sharing
What I did:
1 - created a column "Fake label" to have only empty spaces and so hide type 1 etc ut keep the different result and column for each
2 - created a DAX measure to avoid showing the value for type-12
If this helped, please consider giving kudos and mark as a solution
me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
6 Replies
- FBergamaschiSuper User
Thank you for this clear post and for providing data
Done, here the result
my file is here
https://drive.google.com/drive/folders/14HuWjOKld9A5x-oHacplyMRa6J5rNyjd?usp=sharing
What I did:
1 - created a column "Fake label" to have only empty spaces and so hide type 1 etc ut keep the different result and column for each
2 - created a DAX measure to avoid showing the value for type-12
If this helped, please consider giving kudos and mark as a solution
me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
- 0ExperienceHelper III
FBergamaschi Thanks so much for your time and help. Really appreciate it!
However, I was hoping to show a single value for type-12 (which is just the sum of type-1 and type-2), instead of leaving it blank like in the screenshot I attached with question.
I tried tweaking the 'level' measure you shared, but, I couldn’t get it to work. Not even sure if this is doable.
If you have any ideas or suggestions, please let me know!
- 0ExperienceHelper III
I got the solution using total labels instead of data label.
Accepting your answer as got the idea from you for the fake label.
Thank you.
- FBergamaschiSuper User
More than welcome
- 0ExperienceHelper III
Though the accepted solution doesn't solve the data labels related problem. But you can get it from
Solved: Re: Showing Only Total Labels for Stacked Bar Char... - Microsoft Fabric Community