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: ValidMeasure
Category: Value
Description: The ValidMeasure function returns the value of a measure in a cube by forcing the dimensions to their All level when the dimension does not apply to the measure.
Syntax: VALIDMEASURE( «Tuple» )
Technet Link: MDX ValidMeasure Function




The query below returns the value at the top level for the measure Amount.
 

SELECT
      {[Measures].[Amount]} ON COLUMNS
     
FROM
      [Adventure Works]
 
 

 
The following query shows the measure Amount is not related to the Employee dimension.
 

SELECT
      {[Measures].[Amount]} ON COLUMNS,
      {[Employee].[Employee].[Employee].Members} ON ROWS
FROM
      [Adventure Works]
 
 

 
The query below uses the ValidMeasure function to associate the measure Amount with all members of the Employee dimension.
 
WITH
      MEMBER [Measures].[VMAmount] AS
      VALIDMEASURE([Measures].[Amount])
SELECT
      {[Measures].[VMAmount]} ON COLUMNS,
      {[Employee].[Employee].[Employee].Members} ON ROWS
FROM
      [Adventure Works]
 
 

 
 

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