Forum Discussion

pnem's avatar
pnem
Frequent Visitor
3 years ago
Solved

SAMEPERIODLASTYEAR over multiple year

Hello I would like to know if is there a function that resembles SAMEPERIODLASTYEAR but that can be expanded to more than one year back? Like the average of a monthly value for the same month the la...
  • Uspace87's avatar
    3 years ago

    pnem 

     

    you can use DATEADD, just change the number of intervals you want to go back

     

    Measure = CALCULATE(
        [Sales amt],
       DATEADD(Date_Table[Date],-2,YEAR
    ))