Forum Discussion
Issue with data gaps, matrix view / hierarchy with time functions
Back to this. I have a date table that's connected, so I'm contiguous across dates... that's not causing the break (I've tested around this and everything's working.)
The issue is gaps in products. For example, in Portfolio some Countries have zero sales of a given item. in that Portfolio This isn't expressed as a zero in the data table; there's just no entry at all. In these cases, the visualization break on the calculate of the "Last Year" value:
Total Sales = sum('Sales 2015 to JUN 2017'[Sales_USD])
Total Sales LY = CALCULATE([Total Sales],dateadd('Sales 2015 to JUN 2017'[CAL_DATE],-1,YEAR))
One solution is to add "Zeros" to the data table to cover all potential data gaps across every combination of Country, Date, Portfolio, or include Zero sales items... but my data guy and I both think there must be a more elegant solution.
Hi, did you ever come across a better solution? I may be having a siimlar issue...