Difference percentage between first column and second column (as a column)

  • 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.

 

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

Comments

0 comments

Please sign in to leave a comment.