0
votes

I'm working on an MDX query, i want some measures on the Columns and only one attribute on the rows "the supplier's name" the hierarchy on the suppliers dimension goes like this country->region->city->name How can i select only the name ?

I'm used to relational databases and sql so the multidimensional way of thinking is new to me, here is how i did it for another dimension. its hierarchy is category->name

SELECT {[Measures].[Quantity], [Measures].[UnitPrice], [Measures].[Price]} ON COLUMNS, Order({[Products].[1].children, [Products].[2].children, [Products].[6].children, [Products].[4].children, [Products].[5].children, [Products].[6].children, [Products].[7].children, [Products].[8].children}, [Measures].[Price], DESC) ON ROWS FROM [fact_profit]
1

1 Answers

0
votes

Ok I figured it out I'm now using DESCENDANTS()

SELECT {[Measures].[Quantity], [Measures].[UnitPrice], [Measures].[Price]} ON COLUMNS, TOPCOUNT(Order(descendants([Products], 2.0, SELF_AND_AFTER), [Measures].[Price], DESC), 10.0) ON ROWS FROM [fact_profit]