Set expressions
A set expression tells TeamOne which elements to use. An element is an item in a Planning Analytics dimension, such as a month, a product, or a region. For example, enter Jan;Feb;Mar to show the first three months of the year. You can use the same selection in an exploration, a formula, or a task.
Choose elements
List specific elements
Enter one element name or separate several names with semicolons (;). This is useful when you know exactly which items the report needs.
Actual
Actual;Budget
Jan;Feb;MarUse a saved subset
Put $ before the subset name to use a list already saved in Planning Analytics. For example, use $Reporting Regions to follow the same region list as other reports.
$Reporting RegionsUse subset keywords
Use these built-in keywords to select elements based on where they sit in a hierarchy.
| Keyword | What it selects |
|---|---|
$ALL | Every element, in hierarchy order. |
$LEAVES | Detail elements at level 0, such as individual products. |
$ROOTS | Elements at the top of the hierarchy that have no parent. |
Settings that create subsets, such as ::view and ::dimension, can create the corresponding subset if it doesn’t already exist.
MDX behind the subset keywords
| Keyword | Generated MDX |
|---|---|
$ALL | {HIERARCHIZE({[dimensionName].[hierarchyName].members})} |
$LEAVES | {TM1FILTERBYLEVEL({[dimensionName].[hierarchyName].members}, 0)} |
$ROOTS | {FILTER({[dimensionName].[hierarchyName].members}, [dimensionName].[hierarchyName].CurrentMember.Parent.Name = "")} |
Match a pattern
Wrap the pattern in slashes. Use * for any number of characters and ? for exactly one character.
/*Revenue*/matches names containingRevenue, such asGross Revenue./FY2026 Q?/matches names such asFY2026 Q1andFY2026 Q2.
Paste an MDX set
If you have an MDX set expression from Planning Analytics Workspace, you can paste it directly. This example selects the months under the Q1 total in the Month hierarchy.
{[Month].[Month].[Q1].Children}To run a complete MDX query that returns cube values, use MDX().
Combine selections
Separate selections with ;. You can combine element names, saved subsets, keywords, patterns, or MDX in the same expression. For example, this adds names matching Q? to Jan and Feb, and sorts the quarter matches.
Jan;Feb;/Q?/>>sortascThe >>sortasc modifier applies to the group immediately before it. To apply one modifier to several named elements together, join those names with |. For example, Jan|Feb|Mar>>sortasc sorts the three months as one list.
Refine a selection with MDX mods
Start with a set, then add >> followed by a modifier. TeamOne applies the modifiers from left to right. To show only the detail elements in the third quarter of FY2025, expand the year, keep level 0, then filter the quarter attribute.
FY2025>>expand>>level=0>>quarter=Q3In the Explorer MDX editor, use the modifier buttons to build the expression and choose Convert MDX to see the MDX it generates.
Equivalent MDX for this example
{FILTER(
{TM1FILTERBYLEVEL({TM1DRILLDOWNMEMBER({[Period].[Period].[FY2025]}, ALL)}, 0)},
[Period].[Period].CurrentMember.Properties("quarter") = "Q3"
)}Filter, sort, and limit
| Modifier | What it does |
|---|---|
level=<n> | Keep elements at the given level. Use level=0 for detail elements. |
attribute=value | Keep elements with the given attribute value. For example, quarter=Q3. |
sortasc or sortdesc | Sort by element name in ascending or descending order. |
sortasc=AttributeName or sortdesc=AttributeName | Sort by an attribute, such as a code or description. |
first=<n> or last=<n> | Keep the first or last n elements in the current order. |
distinct | Remove duplicate elements. |
Use | between exact attribute values. For example, $LEAVES>>quarter=Q1|Q2 keeps detail elements for either quarter. You can also filter by a wildcard pattern. This example returns the first five detail elements whose status matches OP?N.
/FY20*/>>descendants>>level=0>>status=OP?N>>first=5Expand, collapse, and order hierarchies
| Modifier | What it does |
|---|---|
children | Show the items directly under each selected element. |
descendants | Show the items at all levels under each selected element. |
expand | Drill down through the selected elements and show their totals and detail together. |
expandleaves | Keep the selected elements and add their lowest-level detail. |
ancestors | Keep each selected element and include its ancestors. When an element has multiple parents, follow the first parent path. |
ancestorsall | Keep each selected element and include ancestors across all parent paths. |
sortbyhierarchy or hierarchize | Put elements in hierarchy order. |
toggle=Element1|Element2 | Expand or collapse the named elements. Separate the names with a pipe. |
drilldown=Element1|Element2 | Expand the named elements and drill into their descendants. |
drillup=Element1|Element2 | Collapse the named elements. |
ancestorsall requires a TM1 database that supports ANCESTORSALL. See IBM’s TM1 Database 12 compatibility notes.
Specify a dimension or hierarchy
Some features need both the dimension and the selection in one expression. For example, in MDX() and ::sheet.burst, separate the names and set with ^.
| Syntax | When to use it |
|---|---|
dimension^setExpression | Use the default hierarchy of a dimension. |
dimension^hierarchy^setExpression | Choose a specific hierarchy. |
Period^FY2025>>children
Period^Fiscal Quarter^$LEAVESIf the dimension is already specified in a separate argument or cell, enter the set by itself. For example, for SUBSET(), the first argument names the dimension.
Show aliases or place detail above totals
If the report needs readable names instead of codes, append ~aliasName. For example, this displays the Description alias for the lowest-level regions.
Region^$LEAVES~DescriptionYou can also name the alias explicitly and add ~expandAbove to show children above their totals.
Region^$ALL~alias=Description~expandAboveTeamOne uses the principal element names by default.
Examples by feature
Build a list in Google Sheets
Use SUBSET() to return captions for the detail elements under FY2025. You can use the result as the source for a report dropdown.
=SUBSET("Period", "FY2025>>expand>>level=0", "Caption")Build dynamic rows or columns
In MDX(), join dimensions on the same axis with *, including the spaces. This example combines regions with the Actual and Budget versions.
Region^$ROOTS>>children~Description * Version^Actual;BudgetGenerate a report for each year and region
For ::sheet.burst, enter one dimension and set per target cell. This example uses two years and the saved subset Reporting Regions.
year^2026;2027
region^$Reporting Regions>>sortasc~DescriptionSpecify elements in a task or model definition
In ::tm1data or ::view, enter the dimension name in column A and the set expression in column B. This example combines named periods, an MDX set, and a pattern.
FY2025;FY2026;{[Calendar].[FY2026].Children};/FY2027 Q?/See also ::subset, ::dimension, and security definitions for where to enter sets in those features.
