Create offline cube files (.cub) with OlapCube. Download Now!

table of contents

Establishing Cube Context

To establish cube context, indicate the cube on which you want the Multidimensional Expressions (MDX) query to run. The FROM clause in an MDX query determines the cube context. The following syntax indicates which cube supplies the context for the MDX query:

FROM «cube_specification»

The «cube_specification» is completed with the name of a single cube.

For example, if an MDX query is to be run against the SalesCube cube, the FROM clause would be:

FROM SalesCube

The following syntax will cause an error, because unlike SQL, the FROM clause in an MDX query does not usually permit joins:

FROM SalesCube, OtherCube