Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

new measure which calculates difference between consecutive years.

Hi, I have below measure named "Total" and a date column. Total is addtion of all the columns present in Sheet1.     Total = SUMX(Sheet1, Sheet1[Ambulances] + Sheet1[Arti.& Multi.Veh] + Sheet1[A...
  • v-yulgu-msft's avatar
    8 years ago

    Hi Anonymous,

     

    Please try this measure:

    difference between consecutive years =
    [Total]
        - CALCULATE (
            [Total],
            FILTER ( ALL ( Sheet1 ), Sheet1[Date] = MAX ( Sheet1[Date] ) - 1 )
        )

     

    Best regards,

    Yuliana Gu