The ISSUBTOTAL function returns the logical value True if the corresponding row contains a subtotal for the column indicated as an argument.
ISSUBTOTAL (
columnName
)
- columnName: Column name that should appear as an argument of the ROLLUP function.
The ISSUBTOTAL function returns a Boolean.
In this example we start from the following data table ("Data"):
Next, we create a grouped table using the SUMMARIZE function, using the Category field as a grouping field and adding the result returned by the ISSUBTOTAL function as an additional column:
Summarized table issubtotal =
SUMMARIZE(
Data,
ROLLUP(Data[Category]),
"Sum", SUM(Data[Value]),
"Max", MAX(Data[Value]),
"Avg", AVERAGE(Data[Value]),
"Subtotal", ISSUBTOTAL(Data[Category])
)
We check how the new column is created, indicating, for each row, whether or not the displayed values are those corresponding to subtotals for the indicated field, Category in our case.