Forum Discussion
RMV
9 years agoHelper V
previous year calculation with time filter
Hi, I have this difficulty in applying a correct formula. I'm trying to apply DAX formula to get the previous year calculation, while I also have Month Slicer applied for my financial report. W...
- 9 years ago
Hi RMV
When you created your date table did you create the relationships?
I created the following measures based on your dataset.
My Amount = SUM(Table1[Amount]) YTD = TOTALYTD([My Amount],'Date'[Calendar Date]) Previous Yr My Amount = CALCULATE([My Amount],PREVIOUSYEAR('Date'[Calendar Date]))Which then gave me the following correct output.
GilbertQ
9 years agoSuper User
Hi RMV
When you created your date table did you create the relationships?
I created the following measures based on your dataset.
My Amount = SUM(Table1[Amount])
YTD = TOTALYTD([My Amount],'Date'[Calendar Date])
Previous Yr My Amount = CALCULATE([My Amount],PREVIOUSYEAR('Date'[Calendar Date]))Which then gave me the following correct output.