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: NonEmpty
Category: Set
Description: The NonEmpty function returns a set of tuples that are not empty based on the cross product of the two supplied sets.
Syntax: NONEMPTY( «Set1», «Set2» )
Technet Link: MDX NonEmpty Function




The query below returns both non empty and empty members of the Fiscal Years level based on the default measure.
 

SELECT
      {[Measures].DefaultMember} ON COLUMNS,
      [Date].[Fiscal].[Fiscal Year].Members ON ROWS
FROM
      [Adventure Works]
 
Note: The query above does not use the NonEmpty function. It can be used to compare resultsets with the queries below.
 

 
The following query returns non empty members of the Fiscal Years level based on the default measure.
 

SELECT
      {[Measures].DefaultMember} ON COLUMNS,
      NONEMPTY([Date].[Fiscal].[Fiscal Year].Members) ON ROWS
FROM
      [Adventure Works]
 
 

 
The query below returns non empty members of the Fiscal Years level based on the Sales Amount measure.
 

SELECT
      {} ON COLUMNS,
      NONEMPTY([Date].[Fiscal].[Fiscal Year].Members, [Measures].[Sales Amount]) ON ROWS
FROM
      [Adventure Works]
 
 

 
 

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