简体   繁体   English

MDX 获取命名集的后代

[英]MDX Get Descendants of Named Set

I'm looking to return all leaf descendants of a named set in MDX.我希望返回 MDX 中命名集的所有叶子后代。

The set contains the following members:该集合包含以下成员:

CREATE SET [Time].[Quarter].[ActiveBudget_Qtr] AS 
   '{[Time].[Default].&[2020Q3], [Time].[Default].&[2020Q4], 
     [Time].[Default].&[2021Q1], [Time].[Default].&[2021Q2]}'

I am trying to return the month (which are leaf) descendants of this set:我正在尝试返回该集合的月份(叶子)后代:

DESCENDANTS({[Time].[Default].[ActiveBudget_Qtr]}, , LEAVES)

However, this is not returning any members.但是,这不会返回任何成员。 Thoughts?想法?

A little bit convoluted but something like the following:有点令人费解,但类似于以下内容:

DESCENDANTS(
  INTERSECT( 
    [Time].[Quarter].[Quarter].MEMBERS
   ,[Time].[Quarter].[ActiveBudget_Qtr]
  )
,, LEAVES
)

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

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