LookupCube
Returns the value of a Multidimensional Expressions (MDX) expression evaluated over another specified cube in the same database.
Syntax
Numeric
LookupCube(«Cube String», «Numeric Expression»)
The LookupCube function returns a numeric value, evaluating the numeric expression specified in «Numeric Expression» in another cube within the context of the cube specified in «Cube String».
String
LookupCube(«Cube String», «String Expression»)
The LookupCube function returns a string value, evaluating the string expression specified in «String Expression» in another cube within the context of the cube specified in «Cube String».
Remarks
The LookupCube function works only on other cubes within the same database. The function cannot be used to access cubes in a database other than the one established by the source cube context of the MDX expression. For example, if an MDX SELECT statement refers to the Sales cube in the FoodMart 2000 database, the LookupCube function is limited to other cubes within the FoodMart 2000 database.
Example
Numeric
The following example returns the value of the [Warehouse].[All Warehouses] member in the Warehouse cube:
LookupCube("Warehouse","[Warehouse].[All Warehouses]")
String
The following example returns the full name of the value of the [Warehouse].[Maddock Stored Foods] member in the Warehouse cube:
LookupCube("Warehouse", "MemberToStr([Warehouse].[Maddock Stored Foods])")