Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).
Returns the value of a Multidimensional Expressions (MDX) expression evaluated over another specified cube in the same database.
If a numeric expression is specified, the LookupCube function evaluates the specified numeric expression in the specified cube and returns the resulting numeric value.
If a string expression is specified, the LookupCube function evaluates the specified string expression in the specified cube and returns the resulting string value.
The LookupCube function works on cubes within the same database as the source cube on which the MDX query that contains the LookupCube function is running.
You must provide any necessary current members in the numeric or string expression because the context of the current query does not carry over to the cube being queried.
Any calculation using the LookupCube function is likely to suffer from poor performance. Instead of using this function, consider redesigning your solution so that all of the data you need is present in one cube.