Hi I think I am missing super simple here but I cannot get this working. I want to show a rolling 6 week average which is working and I want to show a rolling 6 week same period last year. I have the following measures working fine:
[This week]
=
ROUND ( SUMX ( Data, Data[Operating] ) / [Total KG], 2 )
[This week (LY)]
=
CALCULATE (
[This week],
ALL ( DatePeriod ),
SAMEPERIODLASTYEAR ( 'Date'[Calendar_Date] )
)
[Rolling 6 wk operating price]
=
CALCULATE (
[Operating avg $/kg],
DATESINPERIOD (
'Date'[Calendar_Date],
LASTDATE ( 'Date'[Calendar_Date] ),
-42,
DAY
)
)
when I do thie rolling 6 week last year calc it just fails on the continuous date periods but I cant figure out why. it shouldnt as far as I can tell.
[Rolling 6 wk operating price Data (LY)]
=
CALCULATE (
[This week (LY)],
DATESINPERIOD (
'Date'[Calendar_Date],
LASTDATE ( 'Date'[Calendar_Date] ),
-42,
DAY
)
)
Ideas appreciated