DROPLEVEL

DROPLEVEL('Node', "Level1" [, "Level2", ...] [, "AggregationType"])

In Dimensionality & hierarchies

The DROPLEVEL function removes one or more levels from a node and aggregates the values of the remaining levels.

When a level is removed, all finer levels in the same hierarchy are also removed automatically (e.g. removing Quarter also removes Month and Day).

Use this function when you know which levels to remove from your data rather than which to keep: DROPLEVEL('Revenue', "Product").

Parameters

NodeNode referenceRequired
Input node, specified in single quotes (e.g. 'Revenue')
Level1, Level2, …Level nameRequired
Level names to remove from the output, specified in double quotes (e.g. "Product")
AggregationTypeStringOptional
Aggregation method for combining values. Default: Node’s own aggregation type (typically "SUM").

See also: Aggregation Settings for all available aggregation methods

Output shape

Dimensionality
Specified levels (and any finer levels in the same hierarchy) are removed
Values
Remaining values are aggregated
Row count
Reduced

Watch out

  • Removing a level also removes all finer levels below it in the hierarchy.
  • DROPLEVEL specifies what to remove. If you want to specify what to keep, use ROLLUP instead.
  • The default aggregation is the node’s own aggregation type (typically SUM). Use the AggregationType parameter when you need a different method.

Examples

Input node: 'Revenue'

MonthProductValue
2025-01Alpha50
2025-02Alpha45
2025-01Beta40
2025-02Beta54

Remove the product dimension

To see total revenue per month regardless of product, remove the Product level:

Formula: DROPLEVEL('Revenue', "Product")

MonthCalculationResult
2025-0150 + 4090
2025-0245 + 5499

Removing a parent level cascades to finer levels

To get a single total per product across all time, remove the Quarter level. Because Month is finer than Quarter in the same hierarchy, it is also removed automatically.

Input node: 'Revenue'

QuarterMonthProductValue
Q12025-01Alpha50
Q12025-02Alpha45
Q12025-03Alpha60
Q12025-01Beta40
Q12025-02Beta54
Q12025-03Beta35

Formula: DROPLEVEL('Revenue', "Quarter")

ProductCalculationResult
Alpha50 + 45 + 60155
Beta40 + 54 + 35129

Both Quarter and Month are removed because Month is a finer level within the same hierarchy.

Using AVG instead of SUM

To find each product’s average monthly revenue instead of the total:

Formula: DROPLEVEL('Revenue', "Month", "AVG")

ProductCalculationResult
Alpha(50 + 45) / 247.5
Beta(40 + 54) / 247

See also

ROLLUP
When you know which levels to keep rather than remove.
ROLLUP_TO
When you want to match another node’s dimensional structure automatically.
EXPAND
When you need to add levels instead of removing them (the inverse of DROPLEVEL).
Was this page helpful?