Forum Discussion
PowerEnthusiast
Helper I
7 years agoCalculate difference between consecutive rows / columns
Please help... I am currently running through a similar issue, in that I would like to display the differences between values. Column 1 | Column 2 | Column 3 | Column 4 | Column 5 ...
- 7 years ago
Hi,
You could try and create this calculated column
Calculated column = VAR RowAbove= CALCULATE ( SUM (Table[Value]), FILTER (Table, Table[Index] = EARLIER (Table[Index]) - 1)) RETURN Table[Value] - RowAbove
Anonymous
7 years agoNot applicable
PowerEnthusiast - It would be straightforward to create a new Calculated Column for each of those values - is that what you're looking for? If so, here is an example:
Diff One vs Two = [Column 1] - [Column 2]
If that is not what you're looking for, could you please elaborate on the desired behavior?
Cheers,
Nathan
- PowerEnthusiast7 years ago
Helper I
Thank you for the reply.
Apologies, I am new to all this.
I have various account names that needed to be sorted, so I included an index field. Then I wanted to calculate the difference between the Account Names, but ensuring that the difference is calculated in the order as shown below.
- Gordonlilj7 years ago
Solution Sage
Hi,
You could try and create this calculated column
Calculated column = VAR RowAbove= CALCULATE ( SUM (Table[Value]), FILTER (Table, Table[Index] = EARLIER (Table[Index]) - 1)) RETURN Table[Value] - RowAbove
- PowerEnthusiast7 years ago
Helper I