0

帮助 mdx 查询 plz (Essbase 11.1.1) 我有 3 个维度

[YEAR]
[SF]
[OPR_KIND]

1 级层次结构

Measure: [Accounts].[FCT_OPR_SUM]

我必须找到:前 2 年,每年 3 个顶级 SF,每个 SF 1 个顶级 OPR_KIND

对于 1 个嵌套顶部,我这样做:

WITH
SET top2Year as 'TopCount( [YEAR].Generations(2).MEMBERS,2)'
SELECT {[Accounts].[FCT_OPR_SUM]} ON COLUMNS, 
NON EMPTY 
{
generate(top2Year,
crossjoin( top2Year,topcount( [SF].Generations(2).MEMBERS,3)
)
)
} 
ON ROWS
FROM cube1f.cube1f

如何处理 2 个或更多嵌套顶部?

4

1 回答 1

0

你可以用接近这个的东西来做到这一点:

Generate(TopCount([YEAR].Generations(2).MEMBERS, 2, [Accounts].[FCT_OPR_SUM]), 
   {[YEAR].CurrentMember} * Generate(TopCount([SF].Generations(2).MEMBERS, 3, [Accounts].[FCT_OPR_SUM]), 
           {[SF].CurrentMember} * TopCount('your OPR_KIND set', 1, [Accounts].[FCT_OPR_SUM])
   )
)
于 2012-11-15T22:13:01.323 回答