简体   繁体   English

层次结构的SSAS MDX命名集问题

[英]SSAS MDX Namedset issue with hierarchy

I'm using some MDX to create a named set in SSAS. 我正在使用某些MDX在SSAS中创建命名集。

I have a hierarchy of Company, Group, Store 我具有公司,组,商店的层次结构

I'm trying to filter out a number of specific Store members. 我正在尝试过滤掉一些特定的Store成员。

I've used the Descendants function, as below, to do that, however it then doesn't have any proper hierarchy (expand and collapse etc) when viewing it in Performance Point. 我使用了Descendants函数,如下所示,但是在Performance Point中查看它时,它没有任何适当的层次结构(展开和折叠等)。 Any ideas? 有任何想法吗? Is there a way of doing it without breaking the hierarchy? 有没有办法做到而又不破坏层次结构?

Namedset: 命名集:

Descendants([Company].[Company Hierarchy], [Company].[Company Hierarchy].
[Stores]) 
- [Company].[Company Hierarchy].[Stores].[Store1]  
- [Company].[Company Hierarchy].[Stores].[Store2] 
- [Company].[Company Hierarchy].[Stores].[Store3] 

What you have looks ok. 你的东西看起来还可以。 As an alternative maybe see if the following works: 作为替代方案,也许可以看看下面的方法是否可行:

EXCEPT(
  [Company].[Company Hierarchy].[Stores].MEMBERS
  ,{
     [Company].[Company Hierarchy].[Stores].[Store1]  
    ,[Company].[Company Hierarchy].[Stores].[Store2] 
    ,[Company].[Company Hierarchy].[Stores].[Store3] 
   }
)

Try using HIERARCHIZE around the set. 尝试在集合周围使用HIERARCHIZE

HIERARCHIZE
    (
    Descendants
            (
                [Company].[Company Hierarchy], 
                [Company].[Company Hierarchy].[Stores]  
            ) 
        - [Company].[Company Hierarchy].[Stores].[Store1]  
        - [Company].[Company Hierarchy].[Stores].[Store2] 
        - [Company].[Company Hierarchy].[Stores].[Store3] 
    )

msdn reference for hierarchize 用于分层的msdn参考

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM