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: Filter
Category: Set
Description: The Filter function returns a set based on the supplied filter condition.
Syntax: FILTER( «Set», «Search Condition» )
Technet Link: MDX Filter Function




The query below returns the Customer members from the Customer Geography hierarchy in the Geography dimension whose Internet Order Count is greater than 10.
 

SELECT
      {[Measures].[Internet Order Count]} ON COLUMNS,
      FILTER([Customer].[Customer Geography].[Customer].Members, [Measures].[Internet Order Count] > 10) ON ROWS
FROM
      [Adventure Works]
 
 

 
The query below filters the Date members from the Fiscal hierarchy in the Date dimension where the Sales Amount for the members are between 100000 and 200000.
 

SELECT
      {[Measures].[Sales Amount]} ON COLUMNS,
      FILTER([Date].[Fiscal].[Date].Members, [Measures].[Sales Amount] >= 25000 AND [Measures].[Sales Amount] <= 50000 ) ON ROWS
FROM
      [Adventure Works]
 
 

 
 

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