Hi,
I have some probles with measures for for previous period. I created matrix in wich I look at current year from Jan 1st and every day updating data for yesterday (full day). There is first split by week then by date in matrix rows.
For curent year it’s calculated as it should, but when I calculate for example for period 4 years ago it returns wrong Total at the end of matrix.
Subtotals on a week level are fine, but if you see on the bottom there is total up to 31.01.2019 not to 16.01.2019 because I need to have the same period of 4 years ago. But if I choose from date slicer for example 15th instead of 16th (yesterday actualy) it works fine. I need somehow to limit measure to use period 4 years ago until yesterday date.
As you see subtotals for weeks in the Total should return 10.553K (01.01.2019-16.01.2019) but it returns 17.979K (01.01.2019-31.01.2019) and that is for whole january of 2019.
I used following measures:
Sales current year = SUM(DailySales[Sales_CY])
Sales CY - 4 Dateadd = CALCULATE([Sales current year], DATEADD(DATES[Date], -4, YEAR))
I even try with Parallelperiod but it returns whole year, and it is great for some other ideas
Sales CY - 4 Parallel period = CALCULATE([Sales current year], PARALLELPERIOD(DATES[Date], -4,YEAR))
I have separate DATES lookup table, in which there are split by weeks (Year & Week), and other splits.
I ran through many topics and searching through web but I couldn’t find solution. Really tried to do it on myself but without any success.
Any help will be appreciate greatly.
Thanks.
Sasha