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". Usedimension^hierarchyfor an alternate hierarchy orConnectionName::dimensionNamefor 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 is0. 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
| Flag | What it does |
|---|---|
S | Write the results as static values. By default this clears cells below the formula in its column. |
I | Indent element names by hierarchy level. Use I for one space per level, II for two, or III for three. |
A | Display children above their consolidation. |
R | Use 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. |
X | Skip 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??/>>sortascSee 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")
See the SUBSET examples in Google Sheets.
