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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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

 

 

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

 

 

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Kudoed Authors