Forum Discussion
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/2020 | Person A |
| 21/12/2020 | Person A |
| 22/12/2020 | Person A |
| 23/12/2020 | Person A |
| 24/12/2020 | Person A |
| 25/12/2020 | Person A |
| 26/12/2020 | Person A |
| 27/12/2020 | Person A |
| 28/12/2020 | Person A |
| 29/12/2020 | Person 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
- parry2kSuper User
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.⚡
- parry2kSuper User
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.⚡
- parry2kSuper User
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 ) + 0Check 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.⚡
- ppp2021New Member