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

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

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

The following query shows the bottom 10 Products with the lowest Internet Order Count of at least 200. This same resultset could be obtained using the BottomCount function.

      {[Measures].[Internet Order Count]} ON COLUMNS,
      TAIL(FILTER(Order([Product].[Product Categories].[Product].Members ,[Measures].[Internet Order Count] ,BDESC), [Measures].[Internet Order Count] >= 200) ,10) ON ROWS
      [Adventure Works]


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