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.

Syntax:

Difference(arg1,arg2)

where arg2 is subtracted from arg1 and is one or more of the following values:

Argument Description

numeric

A numeric value. For example, Difference(3,5) returns the absolute value 2.

Numeric values can include decimals and negative values. See Numeric Arguments.

row, column, or reference

A pointer to a row, column, or cell within a grid.

You can specify references in several ways. The reference syntax is: GridName.GridElement[segment(range)].Property . See Row, Column, or Cell Reference Arguments.

The following example returns the difference of two rows on grid1 and grid2:

Difference(grid1.row[1], grid2.row[6])

function

An embedded function.

See Mathematical Functions.

Note:

Difference returns the absolute value of arg2 subtracted from arg1 , whereas the minus sign in subtraction negates a number.

Examples:

Return the absolute value of 8:

Difference(3,-5)

Calculate the difference of two aggregate columns:

Difference(column[E], column[G])

Calculate the difference of two columns that are located on different grids, grid1 and grid2:

Difference(grid1.column[E], grid2.column[E])

Note:

You can type the text label "Difference" or "Variance".