Skip to main content
Version: I2022.4.1

SQLSUM

The SQLSUM function returns the sum of its arguments.

Description

The SQLSUM function is an AtScale extension to MDX. It is an alternative to the + operator, which requires special NULL-handling semantics in the outbound queries generated by AtScale. This function can be used to sum values and simplifies the syntax of outbound SQL queries, because AtScale does not have to add syntax to check for NULLs when it converts MDX to SQL.

You can use this function on place of the + operator when:

  • All measure input values are from the same fact dataset
  • You are sure your input expressions do not produce NULL values (or you have syntax to check for NULL values in your input expression)

Syntax

SQLSUM(numeric_expression,numeric_expression[,...])

Return Value

Returns the sum of its input arguments.

Input Parameters

numeric_expression
Required. A measure attribute or expression that returns a numeric value.

Examples

Add

SQLSUM(avg_sales,avg_tax_rate)