Forum Discussion
Hascins
9 years agoFrequent Visitor
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:/...
- 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
Hascins
9 years agoFrequent Visitor
If this was asked before pls give me a pointer...i didn't find anything that actually helped
- v-ljerr-msft9 years agoMicrosoft Employee
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
- Hascins9 years agoFrequent Visitor
Thank you very much!