Difference
Difference is a mathematical function that returns the absolute value of the difference of a numeric value, row, or column subtracted from another numeric value, row, or column. This is also known as the variance. The function syntax:
Difference(arg1, arg2)
where arg2 is subtracted from arg1 and are one or more of the following arguments:
Table B-11 Arguments for the Difference Function
Argument | Description |
---|---|
numeric |
A numeric value. For example, Difference (3, 5) returns the absolute value 2. Numeric values can include decimals and negative values. |
row, column, or reference |
A pointer to a row, column, or cell within a grid. References can be specified in several ways. The reference syntax: The following example returns the difference of two rows in form grid1: Difference( grid1.row[1], grid1.row[6] ) |
function |
An embedded function |
Note:
The Difference function returns the absolute value of arg2 subtracted from arg1, whereas the minus sign in subtraction negates a number.
Examples:
-
The following example returns the absolute value of 8:
Difference(3, -5)
-
The following example calculates the difference of two aggregate columns:
Difference( column[E], column[G] )
Note:
You can type the text label "Difference" or "Variance."