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 is:
where arg2 is subtracted from arg1 and are expressed by one or more of the following arguments:
A numeric value. For example, Difference (3, 5) returns the absolute value 2. Numeric values can include decimals and negative values. For a description of numeric arguments, see Numeric Arguments. | |
A pointer to a row, column, or cell within a grid. References can be specified in several ways. The reference syntax is: GridName.GridElement[segment(range)].Property For more information, see Row, Column, or Cell Reference Arguments. The following example returns the difference of two rows on grid1 and grid2: | |
An embedded function. For a list of mathematical functions, see Mathematical Functions. |
The Difference function returns the absolute value of arg2 subtracted from arg1, whereas the minus sign in subtraction negates a number. |
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] )
The following example calculates the difference of two columns that are located on different grids, grid1 and grid2:
Difference(grid1.column[E], grid2.column[E])