- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Plot zero when there is no data in line chart
I am sharing my Pbix file here.
I tried with suggestions from several posts, but I am still not getting this issue resolved.
https://community.powerbi.com/t5/Desktop/Show-zero-when-there-is-no-data-in-line-chart/td-p/401921
Basically, I am trying to display zero (goes down to zero level) when count of client is zero / if there is no value.
During the month of June and July 2021, for these criteria (M*H*C* and Private), there is no data (blank value).
Bottom is screenshot of what we have now:
Bottom is expected result:
I tried with following measures (to have a line graph goes down to Zero), but nothing seems to work:
ClientD_M2 = COUNTX('vw_census_trend','vw_census_trend'[ClientID]) + 0
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

@JustinDoh1 What date are you using on the chart? You need to use the DimDate date, and then just do
https://excelwithallison.blogspot.com/2020/04/dimdate-what-why-and-how.html
Zero Measure = [Measure] + 0
Please @mention me in your reply if you want a response.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Thank you so much for your help.
I think the major portion of issue was resolved, but line graph still does not go down to zero.
So, I am thinking it might be an issue with a Measure.
I have a question. How do we write measure like ( Zero Measure = [Measure] + 0 ) from what I have tried?
ClientD_M2 = COUNTX('vw_census_trend','vw_census_trend'[ClientID]) + 0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

@JustinDoh1 See attached upated file.
You got halfway there with the DimDate table but still need to:
* Mark it as Date table
* Use it in the visuals and slicer
I have made both changes in the attached file and I think it's behaving as expected now.
Since there are no entries for June, July you'll never see those on the linechart if you use the Report Date, that's why a Date table is so important. Does that make sense hopefully?
Cheers!
Please @mention me in your reply if you want a response.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

@JustinDoh1 What date are you using on the chart? You need to use the DimDate date, and then just do
https://excelwithallison.blogspot.com/2020/04/dimdate-what-why-and-how.html
Zero Measure = [Measure] + 0
Please @mention me in your reply if you want a response.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
05-06-2024 06:50 AM | |||
01-07-2022 10:49 AM | |||
04-10-2024 09:31 AM | |||
10-16-2023 08:40 AM | |||
01-22-2019 04:40 AM |
User | Count |
---|---|
122 | |
104 | |
83 | |
52 | |
45 |