SELECT [Measures].[Internet Sales Amount] ON COLUMNS, [Customer].[State-Province].CHILDREN ON ROWS FROM [Adventure Works] -- get rid of null SELECT [Measures].[Internet Sales Amount] ON COLUMNS, NON EMPTY [Customer].[State-Province].CHILDREN ON ROWS FROM [Adventure Works] --more measures, more dimensions SELECT { [Measures].[Internet Sales Amount], [Measures].[Internet Freight Cost] } ON COLUMNS, NON EMPTY ( [Customer].[State-Province].CHILDREN, [Product].[Subcategory].CHILDREN ) ON ROWS FROM [Adventure Works] -- order function SELECT [Measures].[Internet Sales Amount] ON COLUMNS, NON EMPTY ORDER( ([Customer].[State-Province].CHILDREN, [Product].[Subcategory].CHILDREN ), [Internet Sales Amount],DESC) ON ROWS FROM [Adventure Works] --calculated member WITH MEMBER [Measures].[GrossProfitPerUnit] AS [Measures].[Internet Gross Profit] / [Measures].[Internet Order Quantity], FORMAT_STRING = '$0.00' -- Result set SELECT { [Measures].[Internet Gross Profit], [Measures].[Internet Order Quantity], [Measures].[GrossProfitPerUnit]} ON COLUMNS, NON EMPTY ([Customer].[State-Province].CHILDREN, [Product].[Subcategory].CHILDREN) ON ROWS FROM [Adventure Works] --set WITH SET [OrderedSales] AS ORDER( ([Customer].[State-Province].CHILDREN, [Product].[Subcategory].CHILDREN ), [Internet Sales Amount],BDESC) SELECT [Measures].[Internet Sales Amount] ON COLUMNS, NON EMPTY [OrderedSales] on rows FROM [Adventure Works] -- set and calculated member together WITH MEMBER [Measures].[GrossProfitPerUnit] AS [Measures].[Internet Gross Profit] / [Measures].[Internet Order Quantity], FORMAT_STRING = '$0.00' SET [OrderedSales] AS ORDER( ([Customer].[State-Province].CHILDREN, [Product].[Subcategory].CHILDREN ), [GrossProfitPerUnit],BDESC) SELECT {[Measures].[Internet Sales Amount], [GrossProfitPerUnit]} ON COLUMNS, NON EMPTY [OrderedSales] on rows FROM [Adventure Works] -- filter WITH MEMBER [Measures].[GrossProfitPerUnit] AS [Measures].[Internet Gross Profit] / [Measures].[Internet Order Quantity], FORMAT_STRING = '$0.00' SET [FilteredOrderedSales] AS FILTER( ORDER( ([Customer].[State-Province].CHILDREN, [Product].[Subcategory].CHILDREN ), [GrossProfitPerUnit],BDESC), [GrossProfitPerUnit] > 500 AND INSTR( [Product].[SubCategory]. CURRENTMEMBER.Name,'BIKE') > 0) SELECT {[Measures].[Internet Sales Amount], [GrossProfitPerUnit]} ON COLUMNS, NON EMPTY [FilteredOrderedSales] on rows FROM [Adventure Works] -- Get the top 10 states based on sales SELECT [Measures].[Internet Sales Amount] on 0, TOPCOUNT( [Customer].[State-Province].CHILDREN, 10,[Internet Sales Amount]) ON 1 FROM [Adventure Works] -- Get the States that make up -- the top 10% of total sales SELECT [Measures].[Internet Sales Amount] on 0, TOPpERCENT( [Customer].[State-Province].CHILDREN, 10,[Internet Sales Amount]) ON 1 FROM [Adventure Works] -- Get the States that represent -- the top 10 million dollars SELECT [Measures].[Internet Sales Amount] on 0, TOPSUM( [Customer].[State-Province].CHILDREN, 10000000,[Internet Sales Amount]) ON 1 FROM [Adventure Works] SELECT [Measures].[Internet Sales Amount] ON COLUMNS, { LastPeriods ( 4, [Date].[Calendar Quarter].Lastchild )} ON ROWS FROM [adventure works] SELECT [Measures].[Internet Sales Amount] ON COLUMNS, { LastPeriods ( 4, [Date].[Calendar].[Month].[February 2004] )} ON ROWS FROM [adventure works] -- Retrieve sales for the month that is -- one year prior to Feb 2004 -- (would be Feb 2003) SELECT [Measures].[Internet Sales Amount] ON COLUMNS, {ParallelPeriod ( [Date].[Calendar].[Month], 12, [Date].[Calendar].[Month].[February 2004] )} ON ROWS FROM [Adventure Works] SELECT [measures].[Internet sales amount] ON COLUMNS, DESCENDANTS ( [Date].[Calendar].[Calendar Year].[CY 2003], [Date].[CALENDAR].[DATE] , SELF_AND_BEFORE ) ON ROWS FROM [adventure works] SELECT [measures].[Internet sales amount] ON COLUMNS, DESCENDANTS ( [Date].[Calendar].[Calendar Year].[CY 2003], [Date].[cALENDAR].[Month] , SELF_AND_BEFORE ) ON ROWS FROM [adventure works]