Example 4

By implementing CrossJoin in a flattened rowsets query, you can use multiple dimensions (at least two). In this example, Market and Product dimensions are requested. For each dimension, the same logic as in previous examples applies: Each dimension, level, and property is allotted one column (in this case, one level and one property are requested).

SELECT NON EMPTY {[Profit] } ON COLUMNS, 
NON EMPTY Crossjoin ([Market].Levels(1).AllMembers,[Product].Levels(1).ALLMEMBERS) 
  DIMENSION PROPERTIES MEMBER_CAPTION 
ON ROWS 
FROM Sample.Basic

This query has the following result (truncated):

[Market]. Levels(1). [MEMBER_CAPTION][Product]. [Family]. [MEMBER_CAPTION][Profit]
EastColas12656
EastRoot Beer2534
EastCream Soda2627
EastFruit Soda6344
EastDiet Drinks2408
WestColas3549
WestRoot Beer9727
WestCream Soda10731
WestFruit Soda5854
WestDiet Drinks8087
.........