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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
dedelman_clng
Community Champion
Community Champion

stacked column chart with legend does not show "0" total label

I have a chart that is counting items by year (X-axis) and by Quarter (Legend). The data in table form shows 0 for all quarters in 2025, but on the stacked column chart the Total Label of 0 is not shown (yellow box is just me highlighting that there is nothing shown.

 

Stacked2.png

Stacked1.png

 

Here is the data in tabular form if you want to recreate it yourself

 

YearQuarterEvents
2021Q111
2021Q27
2021Q311
2021Q410
2022Q110
2022Q25
2022Q34
2022Q48
2023Q13
2023Q27
2023Q36
2023Q49
2024Q18
2024Q210
2024Q316
2024Q45
2025Q10
2025Q20
2025Q30
2025Q40

 

Thanks,

David

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, @dedelman_clng 

I tested and this seems to be the default behavior in Power BI, when dealing with stacked column charts, labels with values of 0 are ignored, especially if there is a legend.

vyohuamsft_0-1739255256741.png

 

When no legend is added, it will show 0

vyohuamsft_1-1739255277476.png

If you want a column with no data to show 0 when you have a legend, then you can try using a line stacked column chart, creating an aggregate measure, and placing it in a Line y-axis,  and the data for 2025 will show 0.

Total Events = IF(SUM('Table'[Events]) = 0, 0, SUM('Table'[Events]))

vyohuamsft_2-1739255537252.png

 

Or you can create a secondary column or measure that replaces the value of 0 with a very small, non-zero value (for example, 0.0001) so that Power BI treats it as a valid value and displays it in the chart. You can then format the data label to display this very small value as 0. I create a measure:

Total Events = IF(SUM('Table'[Events]) = 0, 0.0001, SUM('Table'[Events]))

Put this measure in Y-axis, here is my preview:

vyohuamsft_3-1739255881326.png

 

 

How to Get Your Question Answered Quickly

Best Regards

Yongkang Hua

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

6 REPLIES 6
Anonymous
Not applicable

Hi, @dedelman_clng 

I tested and this seems to be the default behavior in Power BI, when dealing with stacked column charts, labels with values of 0 are ignored, especially if there is a legend.

vyohuamsft_0-1739255256741.png

 

When no legend is added, it will show 0

vyohuamsft_1-1739255277476.png

If you want a column with no data to show 0 when you have a legend, then you can try using a line stacked column chart, creating an aggregate measure, and placing it in a Line y-axis,  and the data for 2025 will show 0.

Total Events = IF(SUM('Table'[Events]) = 0, 0, SUM('Table'[Events]))

vyohuamsft_2-1739255537252.png

 

Or you can create a secondary column or measure that replaces the value of 0 with a very small, non-zero value (for example, 0.0001) so that Power BI treats it as a valid value and displays it in the chart. You can then format the data label to display this very small value as 0. I create a measure:

Total Events = IF(SUM('Table'[Events]) = 0, 0.0001, SUM('Table'[Events]))

Put this measure in Y-axis, here is my preview:

vyohuamsft_3-1739255881326.png

 

 

How to Get Your Question Answered Quickly

Best Regards

Yongkang Hua

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

Thanks. I may report this as a bug to the development team because I can't think of a good reason to suppress zero in a stacked column with legend.

Fowmy
Super User
Super User

@dedelman_clng 

Since you have zero, there is nothing show on the chart for 2025, what do you expect in this case?


Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Hi @Fowmy -

 

I would expect "0" to be shown. If I take away the legend (quarter) then 0 does appear for 2025 (as a data label rather than a total label).

 

stacked3.png

If I turn the stacked column visual into a matrix visual, 0 is shown as the total.

 

stacked4.png

So Power BI knows that the total is 0, not blank. Why does it not show in stacked column (or stacked bar) with a legend?

 

Thanks,

David

@dedelman_clng 

Then, add a zero to your measure,

Total Events = sum(table[events]) + 0

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

@Fowmy 

 

The 0 is in the raw data (see my first post). I have tried using both the SUM auto-measure and an explicit SUM measure but both behave the same.

 

David

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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