NOTE: All the example Questions in this page use this Example Dataset.

NOTE: You can also use the Operators: (+ - * /) for some of these operations. See Using the Expression Builder for more details.

SUM

SynonymsTOTAL, ADD
SyntaxSUM(number1, [number2, ...])
DescriptionAdds the Arguments and returns the total.
Argumentsnumber1: The first number to add.
number2: (Optional & Repeatable) Additional numbers to add to number1.
Examples
  • SUM(SALES) - Adds the SALES values from the entire Data.
  • SUM(SALES, PROFIT) - Adds the SALES and PROFIT values from the entire Data.
Special Cases: The function can behave differently if used in a row-level context:
  • AVG(PRODUCT(SALES, SUM(SALES, PROFIT))) - Here, since the sibling Argument SALES is at row-level, the SUM Function can only return a row-level value. In such cases, it will return the Sum of arguments from that row.

DIFF

SynonymsSUBTRACT, DIFFERENCE
SyntaxDIFF(number1, number2)
DescriptionSubtracts the second Argument from the first.
Argumentsnumber1: The number to subtract from.
number2: The amount to subtract from number1.
Examples
  • DIFF(SALES, PROFIT) - Subtracts PROFIT from SALES in each Data-Row
  • DIFF(AVG(SALES), AVG(PROFIT))
  • DIFF(SALES, 1000)

PRODUCT

Synonyms-
SyntaxPRODUCT(factor1, [factor2, ...])
DescriptionMultiplies the Arguments
Argumentsfactor1: The first number to multiply.
factor2: Additional numbers to multiply with factor1.
Examples
  • PRODUCT(SALES, PROFIT) - Multiplies PROFIT and SALES in each Data-Row
  • PRODUCT(SALES) - Equivalent to PRODUCT(SALES, 1)
  • PRODUCT(AVG(SALES), AVG(PROFIT), 1000)

DIVIDE

SynonymsRATIO
SyntaxDIVIDE(dividend, divisor)
DescriptionDivides the first Argument by the second.
Argumentsdividend: The number to be divided.
divisor: The number to divide with.
Examples
  • DIVIDE(SALES, PROFIT) - Divides SALES with PROFIT in each Data-Row
  • DIVIDE(AVG(SALES), AVG(PROFIT))
  • DIVIDE(SALES, 1000)

QUOTIENT

Synonyms-
SyntaxQUOTIENT(dividend, divisor)
DescriptionDivides the first Argument by the second and returns the Integer portion of the division.
Argumentsdividend: The number to be divided.
divisor: The number to divide with.
Examples
  • QUOTIENT(SALES, PROFIT) - Divides SALES with PROFIT in each Data-Row
  • QUOTIENT(AVG(SALES), AVG(PROFIT))
  • QUOTIENT(SALES, 1000)

REMAINDER

Synonyms-
SyntaxREMAINDER(dividend, divisor)
DescriptionDivides the first Argument by the second and returns the Remainder of the division.
Argumentsdividend: The number to be divided.
divisor: The number to divide with.
Examples
  • REMAINDER(SALES, PROFIT) - Divides SALES with PROFIT in each Data-Row
  • REMAINDER(AVG(SALES), AVG(PROFIT))
  • REMAINDER(SALES, 1000)