I am getting a wrong result of below mdx query.
WITH SET [#DataSet#] as 'NonEmpty({[Store.State_Size].[All].Children})' SET [#StorePartSet#] as '{[Store.Store].[All].[Boston Region].[CT], [Store.Store].[All].[Boston Region].[MA], [Store.Store].[All].[Boston Region].[RI]}' MEMBER [Store.Store].[#Part#] as 'Aggregate({[Store.Store].[All].[Boston Region].[CT], [Store.Store].[All].[Boston Region].[MA], [Store.Store].[All].[Boston Region].[RI]})' SET [#TimePartSet#] as '{[Time.Time].[All].[2005].[20051].[200501].[20050101], [Time.Time].[All].[2005].[20051].[200501].[20050102], [Time.Time].[All].[2005].[20051].[200501].[20050103], [Time.Time].[All].[2005].[20051].[200501].[20050104], [Time.Time].[All].[2005].[20051].[200501].[20050105]}' MEMBER [Time.Time].[#Part#] as 'Aggregate({[Time.Time].[All].[2005].[20051].[200501].[20050101], [Time.Time].[All].[2005].[20051].[200501].[20050102], [Time.Time].[All].[2005].[20051].[200501].[20050103], [Time.Time].[All].[2005].[20051].[200501].[20050104], [Time.Time].[All].[2005].[20051].[200501].[20050105]})' SELECT {[Measures].[SALES_VOLUME]} on columns, NON EMPTY Hierarchize({[#DataSet#]}) on rows FROM [Sales_Transactions] WHERE ([Product.Product].[All].[Clothes Dryers], [Store.Store].[#Part#], [Time.Time].[#Part#])
Here I am filtering store at State level i.e MA, RI and CT but in my result its showing sales volume of all states under the Boston Region.
Important thing to note here is that the State_Size is an attribute defined at State level.
Store Dimension
<Dimension xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2" xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200" xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200" xmlns:ddl300="http://schemas.microsoft.com/analysisservices/2011/engine/300" xmlns:ddl300_300="http://schemas.microsoft.com/analysisservices/2011/engine/300/300" xmlns:ddl400="http://schemas.microsoft.com/analysisservices/2012/engine/400" xmlns:ddl400_400="http://schemas.microsoft.com/analysisservices/2012/engine/400/400" xmlns:ddl500="http://schemas.microsoft.com/analysisservices/2013/engine/500" xmlns:ddl500_500="http://schemas.microsoft.com/analysisservices/2013/engine/500/500">
<ID>Store</ID>
<Name>Store</Name>
<Source xsi:type="DataSourceViewBinding">
<DataSourceViewID>PPSS_AS</DataSourceViewID>
</Source>
<UnknownMember>Hidden</UnknownMember>
<Language>1033</Language>
<Collation>Latin1_General_CI_AS</Collation>
<UnknownMemberName>Unknown</UnknownMemberName>
<Attributes>
<Attribute>
<ID>Region_Attribute</ID>
<Name>Region_Attribute</Name>
<KeyColumns>
<KeyColumn>
<DataType>WChar</DataType>
<DataSize>255</DataSize>
<Source xsi:type="ColumnBinding">
<TableID>PD_STORE</TableID>
<ColumnID>REGION</ColumnID>
</Source>
</KeyColumn>
</KeyColumns>
<NameColumn>
<DataType>WChar</DataType>
<DataSize>255</DataSize>
<Source xsi:type="ColumnBinding">
<TableID>PD_STORE</TableID>
<ColumnID>REGION</ColumnID>
</Source>
</NameColumn>
</Attribute>
<Attribute>
<ID>State_Attribute</ID>
<Name>State_Attribute</Name>
<KeyColumns>
<KeyColumn>
<DataType>WChar</DataType>
<DataSize>255</DataSize>
<Source xsi:type="ColumnBinding">
<TableID>PD_STORE</TableID>
<ColumnID>STATE</ColumnID>
</Source>
</KeyColumn>
</KeyColumns>
<NameColumn>
<DataType>WChar</DataType>
<DataSize>255</DataSize>
<Source xsi:type="ColumnBinding">
<TableID>PD_STORE</TableID>
<ColumnID>STATE</ColumnID>
</Source>
</NameColumn>
<AttributeRelationships>
<AttributeRelationship>
<AttributeID>Region_Attribute</AttributeID>
<Name>Region_Attribute</Name>
</AttributeRelationship>
<AttributeRelationship>
<AttributeID>State_Size_Attribute</AttributeID>
<Name>State_Size</Name>
</AttributeRelationship>
</AttributeRelationships>
</Attribute>
<Attribute>
<ID>State_Size_Attribute</ID>
<Name>State_Size_Attribute</Name>
<KeyColumns>
<KeyColumn>
<DataType>WChar</DataType>
<DataSize>255</DataSize>
<Source xsi:type="ColumnBinding">
<TableID>PD_STORE</TableID>
<ColumnID>STATE_SIZE</ColumnID>
</Source>
</KeyColumn>
</KeyColumns>
<NameColumn>
<DataType>WChar</DataType>
<DataSize>255</DataSize>
<Source xsi:type="ColumnBinding">
<TableID>PD_STORE</TableID>
<ColumnID>STATE_SIZE</ColumnID>
</Source>
</NameColumn>
</Attribute>
<Attribute>
<ID>City_Attribute</ID>
<Name>City_Attribute</Name>
<KeyColumns>
<KeyColumn>
<DataType>WChar</DataType>
<DataSize>255</DataSize>
<Source xsi:type="ColumnBinding">
<TableID>PD_STORE</TableID>
<ColumnID>CITY</ColumnID>
</Source>
</KeyColumn>
</KeyColumns>
<NameColumn>
<DataType>WChar</DataType>
<DataSize>255</DataSize>
<Source xsi:type="ColumnBinding">
<TableID>PD_STORE</TableID>
<ColumnID>CITY</ColumnID>
</Source>
</NameColumn>
<AttributeRelationships>
<AttributeRelationship>
<AttributeID>State_Attribute</AttributeID>
<Name>State_Attribute</Name>
</AttributeRelationship>
</AttributeRelationships>
</Attribute>
<Attribute>
<ID>Store_Attribute</ID>
<Name>Store_Attribute</Name>
<Usage>Key</Usage>
<KeyColumns>
<KeyColumn>
<DataType>WChar</DataType>
<DataSize>256</DataSize>
<Source xsi:type="ColumnBinding">
<TableID>PD_STORE</TableID>
<ColumnID>CUSTOMER_STORE_ID</ColumnID>
</Source>
</KeyColumn>
</KeyColumns>
<NameColumn>
<DataType>WChar</DataType>
<DataSize>256</DataSize>
<Source xsi:type="ColumnBinding">
<TableID>PD_STORE</TableID>
<ColumnID>CUSTOMER_STORE_ID</ColumnID>
</Source>
</NameColumn>
<Translations>
<Translation>
<Language>1033</Language>
<CaptionColumn>
<DataType>WChar</DataType>
<DataSize>256</DataSize>
<Source xsi:type="ColumnBinding">
<TableID>PD_STORE</TableID>
<ColumnID>STORE</ColumnID>
</Source>
</CaptionColumn>
</Translation>
</Translations>
<AttributeRelationships>
<AttributeRelationship>
<AttributeID>City_Attribute</AttributeID>
<Name>City_Attribute</Name>
</AttributeRelationship>
</AttributeRelationships>
</Attribute>
</Attributes>
<Hierarchies>
<Hierarchy>
<ID>Store</ID>
<Name>Store</Name>
<AllMemberName>All</AllMemberName>
<Levels>
<Level>
<ID>Region</ID>
<Name>Region</Name>
<SourceAttributeID>Region_Attribute</SourceAttributeID>
</Level>
<Level>
<ID>State</ID>
<Name>State</Name>
<SourceAttributeID>State_Attribute</SourceAttributeID>
</Level>
<Level>
<ID>City</ID>
<Name>City</Name>
<SourceAttributeID>City_Attribute</SourceAttributeID>
</Level>
<Level>
<ID>Store</ID>
<Name>Store</Name>
<SourceAttributeID>Store_Attribute</SourceAttributeID>
</Level>
</Levels>
</Hierarchy>
<Hierarchy>
<ID>State_Size</ID>
<Name>State_Size</Name>
<AllMemberName>All</AllMemberName>
<Levels>
<Level>
<ID>State_Size</ID>
<Name>State_Size</Name>
<SourceAttributeID>State_Size_Attribute</SourceAttributeID>
</Level>
</Levels>
</Hierarchy>
</Hierarchies>
<ProactiveCaching>
<SilenceInterval>-PT1S</SilenceInterval>
<Latency>-PT1S</Latency>
<SilenceOverrideInterval>-PT1S</SilenceOverrideInterval>
<ForceRebuildInterval>-PT1S</ForceRebuildInterval>
<Source xsi:type="ProactiveCachingInheritedBinding" />
</ProactiveCaching>
</Dimension>