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: Head
Category: Set
Description: The Head function returns the first specified number of members from the supplied set.
Syntax: HEAD( «Set»[, «Numeric Expression»] )
Technet Link: MDX Head Function

The query below returns the first four members from the Date.Date hierarchy in the Date dimension.

      {} ON COLUMNS,
      HEAD([Date].[Date].[Date].Members,4) ON ROWS
      [Adventure Works]

The following query shows the top 10 Products with the highest Internet Order Count. This same resultset could be obtained using the TopCount function.

      {[Measures].[Internet Order Count]} ON COLUMNS,
      HEAD(Order([Product].[Product Categories].[Product].members ,[Measures].[Internet Order Count] ,BDESC) ,10) ON ROWS
      [Adventure Works]


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