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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
JustinDoh1
Post Prodigy
Post Prodigy

Plot zero when there is no data in line chart

I am posting this question again (from last week's) because I thought I got the solution, but the issue is not resolved.

 

I am sharing my Pbix file here.

 

I am trying to display zero (goes down to zero level) when the 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:

JustinDoh1_0-1640046861736.png

 

Bottom is expected result:

JustinDoh1_1-1640046896196.png

 

I tried with following chocies of measures (to have a line graph goes down to Zero), but nothing seems to work:

ClientD_M = COUNT('vw_census_trend'[ClientID]) + 0
ClientID_M1 = CALCULATE(count(vw_census_trend[ClientID]), vw_census_trend[ClientID] > 0)

ClientD_M2 = COUNTX('vw_census_trend','vw_census_trend'[ClientID]) + 0

ClientD_M3 = IFISBLANK (COUNT(vw_census_trend[ClientID])), 0COUNT(vw_census_trend[ClientID] )) + 0
 
I also tried with having a separate DimDate table and created a relationship to , but it still does not make a difference.
 
I would appreciate for help.
2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@JustinDoh1 , I used date table on axis and filter; and getting results you wanted

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

YukiK
Impactful Individual
Impactful Individual

The reason that it's not showing 0 is that your rptDate doens't have those dates. With the help of your Date table, it should be possible, but you'd need to use the Date from your Date table. If you wanna filter by RptDate then you'd need to modify the relationship to "both" direction or use "CROSSFILTER" function in your count measure.

 

Hope that makes sense! Let me know if you have any questions!

View solution in original post

2 REPLIES 2
YukiK
Impactful Individual
Impactful Individual

The reason that it's not showing 0 is that your rptDate doens't have those dates. With the help of your Date table, it should be possible, but you'd need to use the Date from your Date table. If you wanna filter by RptDate then you'd need to modify the relationship to "both" direction or use "CROSSFILTER" function in your count measure.

 

Hope that makes sense! Let me know if you have any questions!

amitchandak
Super User
Super User

@JustinDoh1 , I used date table on axis and filter; and getting results you wanted

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors