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: Intersect
Category: Set
Description: The Intersect function returns the intersection of two supplied sets. There is an optional flag that will allow you to retain duplicates across the supplied sets.
Syntax: INTERSECT( «Set1», «Set2»[, ALL] )
Technet Link: MDX Intersect Function




The query below returns the set of members from the first set that intersect with members in the second set.
 

SELECT
      INTERSECT({[Date].[Fiscal].[Month].Members}, {[Date].[Fiscal].[Month].[July 2003], [Date].[Fiscal].[Month].[July 2004], [Date].[Fiscal].[Month].[September 2001]}) ON COLUMNS
     
FROM
      [Adventure Works]
 
 

 
The query below returns the set of members from the first set that intersect with members in the second set.
 

SELECT
      {} ON COLUMNS,
      INTERSECT({[Date].[Fiscal].AllMembers}, {[Date].[Fiscal].[Fiscal Quarter].Members}) ON ROWS
FROM
      [Adventure Works]
 
 

 
 

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