Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Icon for Administrator rankAdministrator
4 years ago
Solved

Calculate percentage change between 2 fields in the same column

Hello, I need to calculate the percentage change of the column "2022" on "2021". Both columns with part of the same field that is called "Year".

Thanks a lot

  • Hi Syndicate_Admin ,

     

    I think your data maybe like this:

     

    Create a new column to calculate the percentage change of the column "2022" on "2021":

     

    Percentage = 
    var year_2021 = CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Year] = 2021 && 'Table'[ID] = EARLIER('Table'[ID])))
    var year_2022 = CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Year] = 2022 && 'Table'[ID] = EARLIER('Table'[ID])))
    return
    DIVIDE(year_2022 - year_2021,year_2021)

     

     

    I think this is the result you want:

    Best regards,

    Yadong Fang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies