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: IsEmpty
Category: Value
Description: The IsEmpty function returns either true or false depending on whether the evaluated expression is empty.
Syntax: ISEMPTY( «Value Expression» )
Technet Link: MDX IsEmpty Function




The query below returns True or False for the Date members of the Calendar hierarchy where the Sales Amount for the current Date member is empty.
 
WITH
      MEMBER [Measures].[AmIEmpty] AS
      ISEMPTY(([Date].[Calendar].CurrentMember, [Measures].[Sales Amount]))
SELECT
      {[Measures].[AmIEmpty]} ON COLUMNS,
      {[Date].[Calendar].[Date].Members} ON ROWS
FROM
      [Adventure Works]
 
 

 
The following query uses the IsEmpty function in a filter clause to restrict the returned set to Date members that have empty values for the Sales Amount measure.
 

SELECT
      {[Measures].[Sales Amount]} ON COLUMNS,
      FILTER([Date].[Calendar].[Date].Members, ISEMPTY([Measures].[Sales Amount])) ON ROWS
FROM
      [Adventure Works]
 
 

 
 

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