The following query builds on the previous, and also asks for the result set to include the member unique name and level number properties for the set of levels 1 through N, where N=2. Each member and each property is allotted a row.
SELECT NON EMPTY {[Profit]} ON COLUMNS,
NON EMPTY [Product].Levels(2).ALLMEMBERS
DIMENSION PROPERTIES MEMBER_UNIQUE_NAME, LEVEL_NUMBER
ON ROWS
FROM Sample.BasicThis query has the following result (truncated):
| [Product]. [Family]. [MEMBER_ UNIQUE_ NAME] | [Product]. [Family]. LEVEL_ NUMBER | [Product]. [SKU]. [MEMBER_ UNIQUE_ NAME] | [Product]. [SKU]. LEVEL_ NUMBER | [Profit] |
|---|---|---|---|---|
| [100] | 1 | [100–10] | 2 | 22777 |
| [100] | 1 | [100–20] | 2 | 5708 |
| [100] | 1 | [100–30] | 2 | 1983 |
| [200] | 1 | [200–10] | 2 | 7201 |
| [200] | 1 | [200–20] | 2 | 12025 |
| [200] | 1 | [200–30] | 2 | 4636 |
| [200] | 1 | [200–40] | 2 | 4092 |
| [300] | 1 | [300–10] | 2 | 12195 |
| [300] | 1 | [300–20] | 2 | 2511 |
| [300] | 1 | [300–30] | 2 | 2511 |
| ... | ... | ... | ... | ... |