Home      Functions     Common Solutions      Contact     






MDX Functions:
 
MDX Functions

 
Common Solutions

Common Solutions
 
Resource Links

MDX Books
MDX Related Software
MDX Related Blogs
 
Other Links

Contact Us
 
Microsoft SQL Server Analysis Services Function Page
Function Name: LookupCube
Category: Navigation
Description: The LookupCube function returns the value of an MDX expression from a different cube in the same database.
Syntax: LOOKUPCUBE( «Cube Name», «Numeric Expression» )
Technet Link: MDX LookupCube Function




The query below creates the ChanSalesPacSalesAmount calculated member that uses the LookupCube function to query the Channel Sales cube for the Reseller Sales Amount from the Pacific Group level of the Sales Territory hierarchy in the Sales Territory dimension.
 
WITH
      MEMBER [Measures].[ChanSalesPacSalesAmount] AS
      LOOKUPCUBE("Channel Sales", "([Sales Territory].[Sales Territory].[Group].[Pacific], [Measures].[Reseller Sales Amount])")
SELECT
      {[Measures].[ChanSalesPacSalesAmount]} ON COLUMNS
     
FROM
      [Adventure Works]
 
 

 
The query below creates the FinanceManufBudgetVarAmount calculated member that uses the LookupCube function to query the Finance cube for the Budget Variance Scenario for the Manufacturing member of the Department dimension.
 
WITH
      MEMBER [Measures].[FinanceManufBudgetVarAmount] AS
      LOOKUPCUBE("Finance", "([Scenario].[Scenario].[Budget Variance], [Department].[Departments].[Manufacturing], [Measures].[Amount])")
SELECT
      {[Measures].[FinanceManufBudgetVarAmount]} ON COLUMNS
     
FROM
      [Adventure Works]
 
 

 
 

 
Copyright 2008 by MDXpert.com.
 
Terms of Use                              Privacy Statement
 
Site Powered By - WinHost.Com