The following query requests a maximum of two levels. The flattening of rowsets includes level 1 in this request for levels(2). When using flattened rowsets, if you query for level N, levels 1 through N are returned.
SELECT NON EMPTY {[Profit] } ON COLUMNS, NON EMPTY [Product].Levels(2).ALLMEMBERS ON ROWS FROM Sample.Basic
This query has the following result (truncated):
[Product].[Family].[MEMBER_CAPTION] | [Product].[SKU].[MEMBER_CAPTION] | [Profit] |
---|---|---|
100 | 100–10 | 22777 |
100 | 100–20 | 5708 |
100 | 100–30 | 1983 |
200 | 200–10 | 7201 |
200 | 200–20 | 12025 |
200 | 200–30 | 4636 |
200 | 200–40 | 4092 |
... | ... | ... |