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
v-ljerr-msft
9 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
Hascins
9 years agoFrequent Visitor
Thank you very much!