Forum Discussion

RMV's avatar
RMV
Helper V
9 years ago
Solved

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...
  • GilbertQ's avatar
    GilbertQ
    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.