在MDX中Where子句不过滤计算成员

时间:2012-07-05 19:01:29

标签: mdx

为什么where子句过滤器与[All subcategoty]成员一起使用 而不是[All_Category]成员?

with member [All_Category] as
    ([Product].[Category].[All Products],[Measures].[Reseller Sales Amount])
member [All_SubCategory] as
    ([Product].[Subcategory].[All Products],[Measures].[Reseller Sales Amount])
select 
    {[All_Category],
    [All_SubCategory],
    [Measures].[Reseller Sales Amount]} on 0
from [Adventure Works]
where [Product].[Category].&[4]

结果:

All_Categry     All_SubCategry      Reseller Sales Amount

$80,450,596.98  $571,297.93     $571,297.93

1 个答案:

答案 0 :(得分:0)

因为[All_Category]的表达式会更改当前类别。

我认为[Product].[Category].[All Products][Product].[Subcategory].[All Products]不属于同一层次结构