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: BottomPercent
Category: Set
Description: The BottomPercent function sorts a set in ascending order, then returns tuples from the bottom of the set with the lowest values whose cumulative total is less than or equal to the supplied percentage.
Syntax: BOTTOMPERCENT( «Set», «Percentage», «Numeric Expression» )
Technet Link: MDX BottomPercent Function




The query below returns the bottom 10 percent of Products based on Sales Amount. Notice the BottomPercent function returns products with empty values.
 

SELECT
      {[Measures].[Sales Amount]} ON COLUMNS,
      {BOTTOMPERCENT([Product].[Product].[Product].Members,10,[Measures].[Sales Amount])} ON ROWS
FROM
      [Adventure Works]
 
 

 
The following query returns the bottom 10 percent of Products based on Sales Amount that are not empty.
 

SELECT
      {[Measures].[Sales Amount]} ON COLUMNS,
      BOTTOMPERCENT(FILTER([Product].[Product].[Product].Members, NOT ISEMPTY([Measures].[Sales Amount])),10,[Measures].[Sales Amount]) ON ROWS
FROM
      [Adventure Works]
 
 

 
 

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