You should be able to follow the approach you suggested.
Another possibility, with better performance, is to define Population
Code as a Member Property at Store level. Next create a Virtual
Dimension, say [Population Code], on that Member Property. Then, for a
given store, you can get sales for all stores with that Code by
selecting the correct member in the Virtual Dimension - no Filter()
needed.
To illustrate, consider Store dimension of Sales cube in Foodmart. This
has "Store Type" property, and [Store Type] Virtual Dimension. Suppose,
for each of the stores, we need sales also as a fraction of total for
that "Store Type":
Quote:
|
With Member [Measures].[Store Type] as
|
'[Store].CurrentMember.Properties("Store Type")'
Member [Measures].[Fraction Of Type] as
'([Store].CurrentMember,[Measures].[Store Sales])
/([Store].[All Stores],Members("[Store
Type].["+[Store].CurrentMember.Properties("Store Type")+"]"),
[Measures].[Store Sales])',
FORMAT_STRING = 'Percent'
Select {[Measures].[Store Type],[Measures].[Store
Sales],[Measures].[Fraction Of Type]} on Columns,
Descendants([Store].[All Stores].[USA].[WA],,LEAVES) on Rows
from Sales
- Deepak
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!