Forum Discussion

matdub40's avatar
matdub40
Icon for Helper III rankHelper III
5 years ago
Solved

How to calculate the difference between two values in different years?

I have a date table that contains these columns:     I use a "Euro Gross Amount" measure in a matrix on Power BI:     I would like to calculate the difference on the Euro Gross betw...
  • PC2790's avatar
    5 years ago

    Try this:

    DIFF =
    DIVIDE (
        [Euro Gross Amount]
            CALCULATE ( [Euro Gross Amount], SAMEPERIODLASTYEAR ( 'date'[date] ) ),
        CALCULATE ( [Euro Gross Amount], SAMEPERIODLASTYEAR ( 'date'[date] ) ),
        0
    )
     
    And convert this measure to a percentage in Measure Tools section