Forum Discussion

antotan's avatar
antotan
New Member
4 years ago
Solved

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:

 

Order number Order date Turnover
00130/1/202210 €
00230/1/202220 €
0032/2/202215 €

 

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.

1 Reply

  • aj1973's avatar
    aj1973
    Icon for Community Champion rankCommunity Champion

    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.