Returns the value of an MDX statement.

XL3MdxLookup( Connection, MdxExpression, [Column], [Row] )

ParameterDescription
ConnectionConnection number to use
MdxExpressionThe MDX expression to run
ColumnThe result column to obtain the value from. 1-based, and defaults to the first column if omitted.
RowThe result row to obtain the value from. 1-based, and defaults to the first row if omitted.

This example is based on the Bicycle Sales cube and returns the level ordinal of the product 'Mountain'.

=XL3MdxLookup( 1, "WITH MEMBER [Measures].LevelOrdinal AS 'Product.CurrentMember.LEVEL.ORDINAL' SELECT {[Measures].LevelOrdinal} ON COLUMNS, {[Product].&[Mountain]} ON ROWS FROM BicycleSales", 1, 1 )