Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Difference between values in same column

Hi   I'm trying to display the difference between values in a table. I have searched around and viewed PREVIOUSMONTH function etc but the way my data is structured there are gaps in dates between e...
  • v-piga-msft's avatar
    7 years ago

    Hi Anonymous ,

    You need create an Index column in Query Editor and create a measure with the formula below.

    Measure =
    VAR a =
        CALCULATE (
            [click_reate],
            FILTER (
                ALLSELECTED ( 'Table1' ),
                'Table1'[Index]
                    = MAX ( 'Table1'[Index] ) - 1
            )
        )
    RETURN
        IF ( a = BLANK (), BLANK (), 'Table1'[click_reate] - a )
    

    Here is the output.

    Best Regards,

    Cherry