Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Percent Change between values

Hi everybody!,   I'm having a problem trying to calculate this % change, what I need is quite simple i want to see the variation from 1/0 (299,87/82,97), 2/1 (336,56/299,87), 3/2 (318,29/336,56),et...
  • v-juanli-msft's avatar
    6 years ago

    Hi Anonymous 

    Assume you have data as below

    Then create a measure

    Measure =
    VAR pre =
        CALCULATE (
            SUM ( 'Table'[value] ),
            FILTER (
                ALLEXCEPT ( 'Table', 'Table'[group] ),
                'Table'[index]
                    = MAX ( 'Table'[index] ) - 1
            )
        )
    RETURN
        IF ( pre = BLANK (), BLANK (), SUM ( 'Table'[value] ) / pre )
    

     

    Best Regards
    Maggie
    Community Support Team _ Maggie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.