I have a problem about the difference calculation for the rows using calculated column in Spotfire.
I am wondering if it is possible to create a calculated column th
@ZAWD - Another way of solving this:
Step 1: Inserted a calculated column 'RowID' using the expression RowId()
Step 2: Inserted a calculated column 'test0' using the expression below
sum([Value]) over (Intersect(next([RowID]),Previous([Type])))
Step 3: Inserted a calculated column 'test' using the expression below
[Value] - sum([test0]) over (Next([RowID]))
Step 4: Inserted a calculated column 'myresult' using the expression below
Abs(If((Sum([Type]) over ([RowID])=1) and (Sum([Type]) over (Next([RowID]))=1),[test],[Value] - [test0]))
Note: 'test0' and 'test' columns run in the background. They need not be included in the main table
Final table looks like below:
Also, this solution works fine in whichever order the values are in. I have tested this solution with different scenarios and seems to be working fine.