Skip to content

SUBSET() ​

Use SUBSET() to bring a list of dimension elements into Google Sheets. For example, you can use the results as a list of valid choices for a report filter.

Syntax ​

text
=SUBSET(dimName, setExpression, attrName, options, solveOrder)
  • dimName — The dimension, such as "Month". Use dimension^hierarchy for an alternate hierarchy or ConnectionName::dimensionName for another connection.
  • setExpression — The set expression that selects the elements. You can enter the expression directly or reference a cell that contains it.
  • attrName — An optional attribute, such as "Caption_Default", to return in place of the principal name. If an attribute value is empty, TeamOne returns the element name.
  • options — Output flags, such as "SIA".
  • solveOrder — The recalculation order. The default is 0. Use a higher value if the list depends on another formula. You can omit the options and put a numeric solve order in their place.

Options ​

FlagWhat it does
SWrite the results as static values. By default this clears cells below the formula in its column.
IIndent element names by hierarchy level. Use I for one space per level, II for two, or III for three.
ADisplay children above their consolidation.
RUse with S to insert rows for the results and track the output as a named range. Use "SR" when you need to keep existing content below the list.
XSkip the formula when TeamOne recalculates the sheet.

Set expression ​

Choose elements using names, a named subset, keywords such as $LEAVES, wildcard patterns, MDX, or MDX mods. You can combine them in a semicolon-separated list.

text
$roots>>expand;{[month].[Q1].children};/FY20??/>>sortasc

See Set expressions for the full syntax.

Example ​

If B2 contains the set expression, this formula returns the matching Month elements using their captions.

text
=SUBSET("Month", B2, "Caption_Default")

SUBSET formulas returning month captions from several set expressions

See the SUBSET examples in Google Sheets.