Skip to content

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.

text
Actual
Actual;Budget
Jan;Feb;Mar

Use 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.

text
$Reporting Regions

Use subset keywords ​

Use these built-in keywords to select elements based on where they sit in a hierarchy.

KeywordWhat it selects
$ALLEvery element, in hierarchy order.
$LEAVESDetail elements at level 0, such as individual products.
$ROOTSElements 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
KeywordGenerated 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 containing Revenue, such as Gross Revenue.
  • /FY2026 Q?/ matches names such as FY2026 Q1 and FY2026 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.

text
{[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.

text
Jan;Feb;/Q?/>>sortasc

The >>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.

text
FY2025>>expand>>level=0>>quarter=Q3

In 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
text
{FILTER(
  {TM1FILTERBYLEVEL({TM1DRILLDOWNMEMBER({[Period].[Period].[FY2025]}, ALL)}, 0)},
  [Period].[Period].CurrentMember.Properties("quarter") = "Q3"
)}

Filter, sort, and limit ​

ModifierWhat it does
level=<n>Keep elements at the given level. Use level=0 for detail elements.
attribute=valueKeep elements with the given attribute value. For example, quarter=Q3.
sortasc or sortdescSort by element name in ascending or descending order.
sortasc=AttributeName or sortdesc=AttributeNameSort 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.
distinctRemove 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.

text
/FY20*/>>descendants>>level=0>>status=OP?N>>first=5

Expand, collapse, and order hierarchies ​

ModifierWhat it does
childrenShow the items directly under each selected element.
descendantsShow the items at all levels under each selected element.
expandDrill down through the selected elements and show their totals and detail together.
expandleavesKeep the selected elements and add their lowest-level detail.
ancestorsKeep each selected element and include its ancestors. When an element has multiple parents, follow the first parent path.
ancestorsallKeep each selected element and include ancestors across all parent paths.
sortbyhierarchy or hierarchizePut elements in hierarchy order.
toggle=Element1|Element2Expand or collapse the named elements. Separate the names with a pipe.
drilldown=Element1|Element2Expand the named elements and drill into their descendants.
drillup=Element1|Element2Collapse 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 ^.

SyntaxWhen to use it
dimension^setExpressionUse the default hierarchy of a dimension.
dimension^hierarchy^setExpressionChoose a specific hierarchy.
text
Period^FY2025>>children
Period^Fiscal Quarter^$LEAVES

If 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.

text
Region^$LEAVES~Description

You can also name the alias explicitly and add ~expandAbove to show children above their totals.

text
Region^$ALL~alias=Description~expandAbove

TeamOne 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.

text
=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.

text
Region^$ROOTS>>children~Description * Version^Actual;Budget

Generate 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.

text
year^2026;2027
region^$Reporting Regions>>sortasc~Description

Specify 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.

text
FY2025;FY2026;{[Calendar].[FY2026].Children};/FY2027 Q?/

See also ::subset, ::dimension, and security definitions for where to enter sets in those features.