Forum Discussion
Anonymous
6 years agoNot applicable
Column that returns prior year value
Hi All, I am trying to add a column in to my table model that returns Prior Year amounts. Please see attached. For some reason my current formula is not working. Does anyone know how to solve fo...
amitchandak
6 years agoSuper User
This one should be created as measure.
I use following
YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(('Date'[Date])))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year)))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR(dateadd('Date'[Date],-1,Year))))
last year measure =CALCULATE(SUM(Sales[Sales Amount]),(dateadd('Date'[Date],-1,Year)))