Forum Discussion

ppp2021's avatar
ppp2021
New Member
5 years ago
Solved

Simple line chart not showing 0 values

Hi All,

 

Thank you in advance for your help. I am trying to draw a line chart with a continuous x date axis, showing the count for a specific field. Data for example:

 

Date               Name

10/12/2020Person A
21/12/2020Person A
22/12/2020Person A
23/12/2020Person A
24/12/2020Person A
25/12/2020Person A
26/12/2020Person A
27/12/2020Person A
28/12/2020Person A
29/12/2020Person A

 

When however drawing this, it seems to draw a horizontal line between 10/12 and 21/12; implying that there are no 0 values inbetween. It therefore implies that there is consistently a count of 1, for the whole date range in question. It works fine if plotting as a bar chart, with no bar showing up for those dates with no entry.

 

Please see the below image. Blue is what I get, and red is what I'm expecting

 

 

 

 

  • ppp2021 solution attached.

     

    Check my latest blog post Year-2020, Pandemic, Power BI and Beyond to get a summary of my favourite Power BI feature releases in 2020

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

     

     

12 Replies

  • ppp2021 solution attached.

     

    Check my latest blog post Year-2020, Pandemic, Power BI and Beyond to get a summary of my favourite Power BI feature releases in 2020

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

     

     

    • ppp2021's avatar
      ppp2021
      New Member

      Many thanks parry2k. I shall have to wait until morning as I need admin rights to upgrade to the new version 🙂

       

      Have a great eve

  • ppp2021 on format pane, for x-axis, change the type to "Categorical"

     

    Check my latest blog post Year-2020, Pandemic, Power BI and Beyond to get a summary of my favourite Power BI feature releases in 2020

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

    • ppp2021's avatar
      ppp2021
      New Member

      Thanks parry2k . That looks like it's changed the axis, but it still doesn't show the missing dates between 10 Dec and 21 Dec as below

       

       

  • ppp2021 on x-axis where you put the date column, click arrow next to it and say "show items with no data" or create a measure like this and use it in the values

     

    Measure = COUNTROWS ( Table ) + 0

     

    Check my latest blog post Year-2020, Pandemic, Power BI and Beyond to get a summary of my favourite Power BI feature releases in 2020

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

     

    • ppp2021's avatar
      ppp2021
      New Member

      Hi parry2k , unfortunately both suggestions give me the same result as before...