# Tuples and Sets

In MDX, a tuple is an ordered set of members from one or more dimensions in a cube. Tuples are enclosed in parentheses and separated by commas. For example, the tuple consisting of the member "Boeing 747" from the Aircraft Type dimension and the member "Q4 2022" from the Date dimension is written as follows:

`( [Aircraft Type].[ALL].[Boeing].[Boeing 747], [Date].[ALL]..[Q4] )`

A set is an unordered collection of tuples or members from one or more dimensions in a cube. Sets are enclosed in braces and can be defined using the set-builder notation or the member-list notation. For example, the set of all members from the Aircraft Type dimension is written as follows using the member-list notation:

```{ [Aircraft Type].[ALL].[Boeing].[Boeing 747], [Aircraft Type].[ALL].[Boeing].[Boeing 777], [Aircraft Type].[ALL].[Boeing].[Boeing 787 Dreamliner], [Aircraft Type].[ALL].[Airbus].[Airbus A380], [Aircraft Type].[ALL].[Airbus].[Airbus A350], [Aircraft Type].[ALL].[Airbus].[Airbus A330], [Aircraft Type].[ALL].[Embraer].[Embraer E-Jets], [Aircraft Type].[ALL].[Bombardier].[Bombardier CRJ], [Aircraft Type].[ALL].[Sukhoi].[Sukhoi Superjet] }```

The DNF (Disjunctive Normal Form) syntax rules for tuples and sets in MDX are as follows:

A tuple is in DNF if it contains exactly one member from each dimension in the cube. For example, ( [Aircraft Type].[ALL].[Boeing].[Boeing 747], [Date].[ALL]..[Q4] ) is in DNF.

A set is in DNF if it is a union of one or more tuples, each of which is in DNF. For example, the set {([Aircraft Type].[ALL].[Boeing].[Boeing 747], [Date].[ALL]..[Q4]), ([Aircraft Type].[ALL].[Airbus].[Airbus A380], [Date].[ALL]..[Q4])} is in DNF.

To query the "Turnover" measure for a specific set of tuples or members, use the MDX SELECT statement. For example, to query the "Turnover" measure for the set of all members from the Aircraft Type dimension, use the following MDX statement:

```SELECT { [measure].[Turnover] } ON COLUMNS, MEMBERS([Aircraft Type]) ON ROWS FROM [Airline Turnover];```

This will return the turnover for each member of the Aircraft Type dimension.