The following example uses CrossJoin to represent multiple dimensions, requests a different number of levels for each dimension, and requests multiple properties.
SELECT NON EMPTY { [Profit] } ON COLUMNS, NON EMPTY Crossjoin ([Market].Levels(1).AllMembers,[Product].Levels(2).ALLMEMBERS) DIMENSION PROPERTIES MEMBER_CAPTION, LEVEL_NUMBER ON ROWS FROM Sample.Basic
This query has the following result (truncated):
[Market]. Levels(1). [MEMBER_ CAPTION] | [Market]. Levels(1). [LEVEL_ NUMBER] | [Product]. [Family]. [MEMBER_ CAPTION] | [Market]. Levels(1). [LEVEL_ NUMBER] | [Product]. [SKU]. [MEMBER_ CAPTION] | [Market]. Levels(1). [LEVEL_ NUMBER] | [Profit] |
---|---|---|---|---|---|---|
East | 1 | Colas | 1 | Cola | 2 | 11129 |
East | 1 | Colas | 1 | Diet Cola | 2 | 1114 |
East | 1 | Colas | 1 | Caffeine Free Cola | 2 | 413 |
East | 1 | Root Beer | 1 | Old Fashioned | 2 | -2540 |
East | 1 | Root Beer | 1 | Diet Root Beer | 2 | 982 |
East | 1 | Root Beer | 1 | Birch Beer | 2 | 4092 |
East | 1 | Cream Soda | 1 | Dark Cream | 2 | 3233 |
East | 1 | Cream Soda | 1 | Vanilla Cream | 2 | -918 |
... | ... | ... | ... | ... | ... | ... |