Example 2

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]
100100–1022777
100100–205708
100100–301983
200200–107201
200200–2012025
200200–304636
200200–404092
.........