Cube Builder formulas

More advanced formulas are available in Cube Builder function:

FormulaDescriptionSyntax

GROUP_SUM

Returns the sum of values for each row of the selected group

GROUP_AVG

Returns the average value for each row of the selected group

GROUP_COUNT

Returns the number of values for each row of the selected group

GROUP_COUNTD

Returns the unique number of values for each row of the selected group

GROUP_MIN

Return the smallest value of the selected group

GROUP_MAX

Return the biggest value of the selected group

GROUP_FIRST

Returns the first value of the selected group

GROUP_LAST

Returns the last value of the selected group

ABS

Returns the absolute value of a number

ROUND

Rounds a number to the nearest integer

CEIL

Returns the smallest integer greater than or equal to a number

FLOOR

Returns the largest integer less than or equal to a number

SUM

Returns the sum of all values in the given dimension

COUNT

Returns the count of all values in the given dimension

COUNTD

Returns the count of all unique values in the given dimension

MIN

Returns the smallest value in the given dimension

MAX

Returns the biggest value in the given dimension

AVG

Returns the average value of the given dimension

LAST

Returns the last value of the given dimension

FIRST

Returns the first value of the given dimension

SUMIF

Returns the sum of all values that meet the condition in the given dimension

COUNTIF

Returns the count of all values that meet the condition in the given dimension

COUNTDIF

Returns the count of all unique values that meet the condition in the given dimension

MINIF

Returns the smallest value that meet the condition in the given dimension

MAXIF

Returns the biggest value that meet the condition in the given dimension

AVGIF

Returns the average value of all values that meet the condition in the given dimension

RANK

Assigns a rank to each row within the partition of a result set. The rank of a row is one plus the number of ranks that come before the row in question

FIRST_VALUE

Returns the first value in an ordered set of values

LAST_VALUE

Returns the last value in an ordered set of values

PREVIOUS

Returns the previous value in an ordered set of values

PREVIOUS_NTH

Returns the previous nth value in an ordered set of values

NEXT

Returns the next value in an ordered set of values

Last updated