Forum Discussion
Comparing Periods when SAMEPERIODLASTYEAR doesn't work
- Anonymous6 years ago
Hello All,
I found a simple solution using the DATEADD function. We operate in 13 periods of 28 days, so DATEADD with 364 days does the tricks nicely.
Thank you all for your contributions with inspired this solution.
Michael
Hi MCKERY
Please consider this solution and leave kudos:-
Add a fiscal period offset column to your Calendar. For example
this period = -0
last month =-1
month before = -2
month last year = -12
next month = 1
next year = 12
Then create measures:-
Sales this period = Calculate([Sale KG],Calendar[fiscalperiodoffset]=0)
Sales this period LY = Calculate([Sale KG],Calendar[fiscalperiodoffset]=-12)
- Anonymous2 years agoNot applicable
Hi speedramps, I am very interested to this solution. Could you please explain how the code for this new column should look like? Sorry, I am not so expert on DAX / M
Thanks,
C.