- Type: Inserted as a column
- Description: Calculates the difference, as a percentage, between two values, first column and second column.
- Range:
- Columns: First column minus Second column
- Rows: Each row
- Measures: First measure
- Syntax:
if sum(d2, 0, m1) = 0 then 0 else (sum(d1, 0, m1) - sum(d2, 0, m1)) / sum(d2, 0, m1)
- Sample crosstab:
Example
In the table above we want to calculate the percent difference between 2024 Revenue and 2023 Revenue - this is done by adding Percent difference first column - second 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.