Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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.
Here is the data in tabular form if you want to recreate it yourself
Year | Quarter | Events |
2021 | Q1 | 11 |
2021 | Q2 | 7 |
2021 | Q3 | 11 |
2021 | Q4 | 10 |
2022 | Q1 | 10 |
2022 | Q2 | 5 |
2022 | Q3 | 4 |
2022 | Q4 | 8 |
2023 | Q1 | 3 |
2023 | Q2 | 7 |
2023 | Q3 | 6 |
2023 | Q4 | 9 |
2024 | Q1 | 8 |
2024 | Q2 | 10 |
2024 | Q3 | 16 |
2024 | Q4 | 5 |
2025 | Q1 | 0 |
2025 | Q2 | 0 |
2025 | Q3 | 0 |
2025 | Q4 | 0 |
Thanks,
David
Solved! Go to Solution.
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.
When no legend is added, it will show 0
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]))
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:
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.
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.
When no legend is added, it will show 0
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]))
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:
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.
@dedelman_clng
Since you have zero, there is nothing show on the chart for 2025, what do you expect in this case?
⭕ 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).
If I turn the stacked column visual into a matrix visual, 0 is shown as the total.
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
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
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
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
75 | |
68 | |
41 | |
35 |
User | Count |
---|---|
102 | |
56 | |
52 | |
46 | |
40 |