Forum Discussion

lparks's avatar
lparks
Regular Visitor
4 years ago
Solved

Month Over Month % Change Formula

Hello,    I'm new to power bi and need help with a formula for percent change MOM, please. I would like the percent change as a percentage, but below is the formula of what I want. I also included ...
  • v-yanjiang-msft's avatar
    4 years ago

    Hi lparks ,

    According to your description, here's my solution.

    1.Create a calculated column to calculate the sum total clicks for each month.

    SUM Total Clicks =
    SUMX (
        FILTER ( 'Table', 'Table'[Month] = EARLIER ( 'Table'[Month] ) ),
        'Table'[Total Clicks]
    )
    

    2.Create a measure.

    SUM Total Clicks MOM% =
    VAR _Previous =
        MAXX (
            FILTER ( ALL ( 'Table' ), 'Table'[Month] = MAX ( 'Table'[Month] ) - 1 ),
            'Table'[SUM Total Clicks]
        )
    VAR _DIFF =
        MAX ( 'Table'[SUM Total Clicks] ) - _Previous
    RETURN
        DIVIDE ( _DIFF, _Previous )
    

    3.Get the expected result, as your snapshot shows part of the data, I get a great value.

    I attach my sample below for reference.

    Best Regards,
    Community Support Team _ kalyj

     

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