Forum Discussion

Rosenshredder's avatar
4 years ago
Solved

Line chart not showing zeros when distinct count is zero

I've seen numerous posts about this, but I haven't been able to get any of those solutions to work for me. I've got a line chart with a continuous x-axis showing the previous week. The value is the d...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Rosenshredder ,

     

    You will need to create a calendar table and use the calendar[date] as axis.
    Then create a measure like below:

    CountDriver =
    CALCULATE (
        DISTINCTCOUNT ( 'Test Data File for Power BI'[Driver] ),
        FILTER (
            ALLSELECTED ( 'Test Data File for Power BI' ),
            'Test Data File for Power BI'[date] = SELECTEDVALUE ( 'calendar'[date] )
        )
    ) + 0

     

    Best Regards,

    Jay