Suppose I have a [Sales] cube which has a [Store] level and a store has a "type" property. Which query should I use for showing the sum of sales for all the stores of type "Supermarket"? (e.g. You sold 6M $ in all stores of type "Supermarket")
A:
If you want to access member properties, you can use .properties("propertyname")
You would have to create a custom set which first filtered and then aggregated all the members of the [Store] level which matched the property value "Supermarket".
My MDX skills are a bit rusty...
WITH MEMBER [Stores].[SupermarketSweep] AS 'Aggregate([Filter([Stores].[Store].members, [Stores].currentMember.properties("type") = "Supermarket"))'
SELECT {[Stores].[SupermarketSweep]} ON ROWS,
{[Measures].[Whatever]} ON COLUMNS
FROM [Sales]
Magnus Smith
2010-08-12 11:14:39