Forum Discussion

JustinDoh1's avatar
JustinDoh1
Post Prodigy
4 years ago
Solved

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:

 

Bottom is expected result:

 

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.
  • 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!

2 Replies

  • YukiK's avatar
    YukiK
    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!