Skip to content

PowerSub

Description

PowerSub pre-aggregates a measure after removing selected classification dimensions from the current context.

Syntax

PowerSub(aggregate_expression[, dimension1[, dimension2...]][, filter1[, filter2...]][, RemoveFilter(...)])

Parameters

Parameter Required Type Description
aggregate_expression Yes Expression Aggregation expression. It must contain an aggregate function.
dimension No Field Classification dimension to remove from the current context.
filter No Expression Filter applied before aggregation.
RemoveFilter No Expression Removes filters from the current calculation context.

Notes

Pre-aggregation functions must be used inside supported metric expressions and cannot be nested inside other pre-aggregation functions unless explicitly supported.

Example

PowerSub(Sum(OrderAmount), ProductType)

The expression returns the calculated result according to the current query context.