Power BI Line Chart Getting Confused

481 views Asked by At

I have a Line Chart in Power BI which shows a cumulative MTD total of In-Store and Online Sales.

My data does not show any In-Store Sales for the 7th or 8th of December. Because of this, the visual is displaying gaps in the Line Chart for December (see Line Gaps) when I filter out Online Sales.

Normally it would not be a big deal, because I can understand that Power BI would show a gap in the line rather than a straight line to the next data point. However, when I include Online Sales, all the sudden Power BI has data to work with and it shows a dip in the Cumulative Total - which is ridiculous because a cumulative total is by nature additive ( meaning it should only be increasing ).

Is there any way to avoid this line gap? If not, how can I correct my calculation so that DAX will show me the actual Cumulative Total on the 7th and 8th??? (Blue line sales were 1348 for the 6th, so the 8th should be at least higher than that...

1

There are 1 answers

0
Leonard On BEST ANSWER

Hazarding a guess, but the 2nd parameter of the TOTALMTD function requires a series of dates, and you're passing in POS[Date split]. If this column is missing dates for the 7th and 8th of December, that could be what's causing the problem.

I would recommend a separate date table with a date for each date (no gaps), relating that table to the POS and OnlineOrders tables (if you haven't already), and then passing in that date column to your TOTALMTD function.