Forum Discussion
Power BI - Show zero/null value on line chart with dates
I'm using a simple table like this to make a report in Power BI:
| 001 | 30/1/2022 | 10 € |
| 002 | 30/1/2022 | 20 € |
| 003 | 2/2/2022 | 15 € |
I need to create a line chart showing all the dates, even where I have no data (no orders for that day). This is currently how is shown:
You can notice that the 1/2/22 and 3/2/22 are missing due to no order, but I want them to be visible and the value should be 0. This is also affecting the average line because it's calculated based on the days with data, but I need to put into account also the 0-turnover days.
I tried to use the "Show items with no data" on the date dimension and switch the X axis from Continuous to Catergorical and the other way around. I also tried to create a new metric like this:
Total Turnover = IF(ISBLANK(SUM(Orders[Turnover (EUR)])), 1, SUM(Orders[Turnover (EUR)]))
but it's not working.
Hi antotan
You need to add a Calendar table and link it to order date, then use the date from calendar table into the visual.