- Type: Inserted as a column
- Description: Calculates the difference, as a percentage, between two values, last column and second last column.
- Range:
- Columns: Last column minus Second last column
- Rows: Each row
- Measures: First measure
- Syntax:
if sum(d-2, 0, m1) <=0 then 0 else (sum(d-1, 0, m1) - sum(d-2, 0, m1)) / sum(d-2, 0, m1)
- Sample crosstab:
Example
In the table above we want to calculate the difference between 2024 Revenue and 2023 Revenue as a percentage - this is done by adding Percentage difference last column - second last column (column).
Also notice the behavior of this calculation when dealing with gaps in data and negative numbers.
When you go from a positive number to nothing - it's considered a 100% drop (see below).
Also, growth from a negative number is not calculated as a percentage.
Comments
Please sign in to leave a comment.