Forum Discussion

Hascins's avatar
Hascins
Frequent Visitor
9 years ago
Solved

Values over time

Hi,   I have a table that basically looks like this: http://imgur.com/a/jcaxE   Now I would like to create a measure that calculates the differences in value over time. See column Change http:/...
  • v-ljerr-msft's avatar
    v-ljerr-msft
    9 years ago

    Hi Hascins,

     

    Based on my test, you should be able to follow steps below to get your expected result. :smileyhappy:

     

    1. Add an Index column to your table in Query Editor under Add Column tab.

     

     

    2. Then you should be able to use the formula below to create a new calculate column in your table.

    Change =
    Table1[Value]
        - CALCULATE (
            MAX ( Table1[Value] ),
            FILTER (
                ALL ( Table1 ),
                Table1[Index]
                    = EARLIER ( Table1[Index] ) - 1
                    && Table1[Product] = EARLIER ( Table1[Product] )
            )
        )
    

     

    Regards