MDX 使用其他维度的结果过滤维度成员

MDX Filtering dimension members with result of other dimension

我想用另一个维度中的一些信息来过滤立方体安全性的维度。

所以 - 我有一个维度,其中包含一些负责的帐户(账号和负责人的首字母)和另一个包含所有帐户的维度。 我想确保一个人只能看到他们负责的账户的动向。

我可以这样过滤:

SELECT 
  {} ON 0
 ,{
    Exists
    (
      Filter
      (
          [Accounts].[Accounts].[AccountNo]
        * 
          [AccountResponsible].[AccountResponsible].[AccountNo]
       ,
          [Accounts].[Accounts].Properties("key")
        = 
          [AccountResponsible].[AccountResponsible].Properties("key")
      )
     ,[AccountResponsible].[Responsible].&[MSA]
    )
  } ON 1
FROM mycube;

问题是,有两列,我不能在多维数据集安全性中使用它。有没有办法重写这个,这样我实际上只得到一个包含允许用户看到的成员的列?

尝试使用提取功能:

SELECT 
  {} ON 0
 ,

 EXTRACT(
 {
    Exists
    (
      Filter
      (
          [Accounts].[Accounts].[AccountNo]
        * 
          [AccountResponsible].[AccountResponsible].[AccountNo]
       ,
          [Accounts].[Accounts].Properties("key")
        = 
          [AccountResponsible].[AccountResponsible].Properties("key")
      )
     ,[AccountResponsible].[Responsible].&[MSA]
    )
 }
 ,[Accounts].[Accounts]  //<<HIERARCHY YOU WISH TO EXTRACT
) ON 1
FROM mycube;