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
 

Query the top 10 members from a set based on a measure.

You can use the TopCount function to return the top n members from a set for a supplied measure.

The query below uses the TopCount function to return the top 10 products with the highest Sales Amount.

SELECT {[Measures].[Sales Amount]} ON 0,
TOPCOUNT([Product].[Product].[Product].Members, 10, [Measures].[Sales Amount]) ON 1
FROM [Adventure Works]



 

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