Home  /  Application Development: Analytics Options  /  InterSystems MDX Reference  /  Expression Types  /  Set Expressions

InterSystems MDX Reference
Set Expressions
[Back]  [Next] 
InterSystems: The power behind what matters   

This section describes how to create and use set expressions in InterSystems MDX.
The general syntax for a set expression is as follows:
{expression1, expression2, ...}
This list can include any number of items. In InterSystems MDX, if the list includes only one item, you can omit the curly braces.
In this list, expression1, expression2, and so on can have any of the following forms:
You can precede any set expression with the keyword phrase NON EMPTY, for example:
NON EMPTY {birthd.year.1960:1980}
NON EMPTY birthd.year.1960:1980
The NON EMPTY keyword phrase suppresses empty elements of the set; the set is evaluated and then empty elements are removed. This keyword is particularly useful with CROSSJOIN and in scenarios where a filter can potentially cause elements to be null.
Named Sets
A named set consists of two elements: a set name and a set expression. You can define named sets in two ways:
You can use set expressions in the following ways: