Forum Discussion

SirJJAnderson's avatar
SirJJAnderson
Icon for Helper III rankHelper III
6 years ago
Solved

How to Calculate MoM Percentage Change?

I tried following a solution I found online and it isn't quite working. I was able to create a column that shows the prior month's data, but I can't figure out how to then calculate the percentage change between the two columns.

 

See columns Deliveries & Deliveries MoM, and Delivery % Change error up top in my calculation

 

  • You can try this approach.

     

    Pct Change MOM = var thismonth = sum('Table1'[Deliveries])

    var lastmonth = [Deliveries MOM] //your existing measure

    return divide((thismonth-lastmonth), lastmonth)

     

    If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

    Regards,

    Pat

  • amitchandak's avatar
    amitchandak
    6 years ago

    SirJJAnderson , Try like

    chnage % = DIVIDE((SUM(Table1[Deliveries]) - [Deliveries MOM]), [Deliveries MOM])

     

    And Mark it as % column

4 Replies

  • mahoneypat's avatar
    mahoneypat
    Icon for Microsoft Employee rankMicrosoft Employee

    You can try this approach.

     

    Pct Change MOM = var thismonth = sum('Table1'[Deliveries])

    var lastmonth = [Deliveries MOM] //your existing measure

    return divide((thismonth-lastmonth), lastmonth)

     

    If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

    Regards,

    Pat

    • SirJJAnderson's avatar
      SirJJAnderson
      Icon for Helper III rankHelper III

      So this formula worked, but technically is not correct. You're right about needing to subtract Deliveries MOM from Table1[Deliveries] before I do the divide.

       

      Delivery % Change = DIVIDE(SUM(Table1[Deliveries]), [Deliveries MOM])
       
      How would I adjust this formula to do that? Something like the below? The below doesn't throw an error but the result is wrong.
       
      Delivery % Change = DIVIDE((SUM(Table1[Deliveries]) + [Deliveries MOM]), [Deliveries MOM])
      • amitchandak's avatar
        amitchandak
        Icon for Super User rankSuper User

        SirJJAnderson , Try like

        chnage % = DIVIDE((SUM(Table1[Deliveries]) - [Deliveries MOM]), [Deliveries MOM])

         

        And Mark it as % column