MDX Functions: BottomCount

MDX Functions: BottomCount

The MultiDimensional eXpressions, or MDX, language is used to query the data in a multidimensional in an OLAP database. In the case of examples here, SQL Server Analysis Services. This example uses the Contoso demo cube available for download here: microsoft.com/download/en/details.aspx?disp.. Function Name: BottomCount Use Case: Brings back the lowest X number of values from a set MSDN Link: http://msdn.microsoft.com/en-us/library/ms144864.aspx Notes: Always breaks a hierarchy Syntax: BOTTOMCOUNT(<>, Number of Tuples to return, <>) Sample Query: SELECT [Measures].[Online Sales Amount] ON COLUMNS, BOTTOMCOUNT( [Product].[Product Category].CHILDREN, 2, [Measures].[Online Sales Amount] ) ON ROWS FROM [Contoso] Sample Results: