Difference between current row and previous row (as a column)

  • Type: Inserted as a column
  • Description: Calculates the difference between two values, current row and previous row, in last column.
  • Range:
    • Columns: Last column
    • Rows: Each row minus Previous row
    • Measures: First measure
  • Syntax:
sum(d-1, 0, m1) - sum(d-1, -1, m1, sum(d-1, 0, m1))
  • Sample crosstab:

 

Example

Here we want to calculate the difference between current row and previous row (months) for the last column.. 

Notice that the first row sums to 0, since there is no previous row.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.