0

I have a table where some of the rows(dates) are missing and I want to report zero for those in the chart. I am taking this table from some source and I cannot change that table to add missing dates. my table is something like this:

datetime | type | value
25 Apr   |  A   |  2
25 Apr   |  B   |  18
26 Apr   |  A   |  2
26 Apr   |  B   |  19
27 Apr   |  A   |  2
27 Apr   |  B   |  10
28 Apr   |  B   |  29
29 Apr   |  B   |  32
30 Apr   |  B   |  33
...

plotting linechart and with 'type' as legend, the line for 'A' doesnot appear after 27 Apr while line for 'B' shows. somewhat similar to the image (example explained) below.

I want to show line for A also whereever lines are missing with zero values on the linechart without doing changes to my table. (in this case after 27Apr)

How do I do this in PowerBI reports?

example

Here, two lines are present B=darkblue & A=lightblue. lightblue rows are missing after 27 Apr, so lightblue line doesnot show. I want to show the lightblue line throughout the chart with 0 values where rows are missing.

sharmaji
  • 53
  • 6
  • Does [this](https://stackoverflow.com/questions/55495656/show-0-value-on-line-chart-in-power-bi-for-missing-data) help? – Ron Rosenfeld May 07 '21 at 13:06
  • If the link didn't help, I suggest you use Power Query and add zero values for the missing items of **`A`** – Ron Rosenfeld May 07 '21 at 18:24
  • There is a reason why the designer has choosen not to show anything, there reason is that for the end user it is clear there is no data. If you realy wan this, you need to think how this should work, should A be extended with the latest value (2) or should your A go to zero for the next value? The trick would be generating some extra rows in a table with dummy values in DAX... – Aldert May 11 '21 at 17:59

0 Answers0