Reputation: 57
I must calculate a delta between two time series, based on filtering over one column.
Here's the situation, I've got a table like this:
The user chooses a reference Id with a dropdown list, and the string is stored in document property ReferenceId.
I want a calculated column that will dynamically calculate the difference between the current row value and the corresponding reference row value. For instance, if ReferenceId=Id1:
How can I do that? Thanks in advance.
Upvotes: 2
Views: 669
Reputation: 745
You'll need to reference year to get the correct value... This should work
100*([Value]-First(case when "${ReferenceId}"=[Id1] then [Value] end) over [Year])/First(case when "${ReferenceId}"=[Id1] then [Value] end) over [Year]
Upvotes: 1