Forum Discussion
Unexpected behavior Sameperiodlastyear
- 5 years ago
Anonymous
Did you make it look like this? dateadd('Date'[Date],-365,day)
-1 is yesterday , -365 goes back to 12 months.
amitchandak thanks for your reply, but I already explained in my question that I had tried this already, but I wrote the expression wrong to include DATESMTD.
I have tried your solution again but with the same result. Also as I have included in my post, your solution and sameperiodlastyear are the same as explained in this blogpost -> http://mdxdax.blogspot.com/2011/01/dax-time-intelligence-functions.html
It also does not make sense to me that it would recognise we are only into April (instead of showing last year's full volume) correctly when only selecting the Year in the slicer, but not that we are only onto the 19th day.
Does anyone else have any ideas?