OpenBI Docs Buy

ISSUBTOTAL

In SUMMARIZE with ROLLUP, whether the row is a subtotal of a column.

Group: Table manipulation. Compatible with DAX.

Syntax

ISSUBTOTAL ( <columnName> )
ParameterTypeDescription
columnNameColumnOne of the columns ROLLUP rolls up in the same SUMMARIZE.

Returns

Boolean. TRUE on a subtotal row of that column, FALSE on the other rows.

Remarks

  • It belongs in the name and expression pairs of a SUMMARIZE that uses ROLLUP. On a subtotal row the rolled-up column is blank; ISSUBTOTAL tells such a row from one whose value really is blank.
  • On the grand total row every rolled-up column is a subtotal, so ISSUBTOTAL is TRUE for each.
  • In SUMMARIZECOLUMNS, ROLLUPADDISSUBTOTAL makes the TRUE/FALSE column itself, and ISSUBTOTAL is not needed.

Examples

A grand total row

EVALUATE
SUMMARIZE (
    Sales,
    ROLLUP ( Products[Category] ),
    "Liters", SUM ( Sales[Liters] ),
    "Total row", ISSUBTOTAL ( Products[Category] )
)
ORDER BY [Total row], Products[Category]
Products[Category]LitersTotal row
Beer1505389FALSE
Cider301074FALSE
(blank)1806463TRUE

Naming the level of each row

EVALUATE
SUMMARIZE (
    Sales,
    ROLLUP ( Products[Category], Products[Product] ),
    "Liters", SUM ( Sales[Liters] ),
    "Level",
        IF (
            ISSUBTOTAL ( Products[Category] ), "Grand total",
            IF ( ISSUBTOTAL ( Products[Product] ), "Category", "Product" )
        )
)
ORDER BY Products[Category], Products[Product]
Products[Category]Products[Product]LitersLevel
(blank)(blank)1806463Grand total
Beer(blank)1505389Category
BeerIPA331884Product
BeerLettøl169179Product
BeerPils1004326Product
Cider(blank)301074Category
CiderCider301074Product

ROLLUP, SUMMARIZE, ROLLUPADDISSUBTOTAL, ROLLUPGROUP.

Last updated · OpenBI Studio 0.3.74