Skip to main content
Returns the subtotal for an aggregate expression or column using the specified mode and, optionally, partition/group columns. Category: aggregate Syntax:
Subtotal([aggregate_or_column], mode, |partition_by_column|)
Returns: Float Context Filtering: ✗ No

Parameters

NameTypeRequiredDescription
aggregate_or_columnany✓ YesThe aggregate function (e.g., Sum([Amount])) or column to subtotal. If a column is provided, it will be used directly.
modetext✓ YesSubtotal mode (‘grand_total’, ‘column’, ‘row’, etc.).
partition_by_columncolumn✗ NoPartition/group column for subtotal (required for some modes).

Validation

  • Minimum parameters: 2
  • Maximum parameters: 3

Examples

Subtotal(Avg([Price]), "column", [ProductType])
Returns subtotal average price for each Product Type column.
Subtotal([Revenue], "column", [Region])
Returns subtotal of [Revenue] column for each Region.
Last modified on March 13, 2026