0

我有一个 5 级的层次结构,我使用 Descendants() 来检索成员的所有较低级别。但我最终得到一个一列结果,我希望每个级别都有一列的结果。所以在每一行上我重复当前成员的父母、祖父母等。

WITH 
  MEMBER [Measures].[key] AS 
    [DimGLAcct].[MgtCOA].CurrentMember.UNIQUENAME 
  MEMBER [Measures].[level_] AS 
    [DimGLAcct].[MgtCOA].CurrentMember.level.ordinal 
SELECT 
  { 
    [Measures].[key]
  , [Measures].[level_]
  , [Measures].[Actuals] 
  } ON COLUMNS, 
  { 
    Descendants(
      [DimGLAcct].[MgtCOA].[Mparent5].&[MCOA].&[400000M - Total operating overhead expenses].&[440000M - Other expenses].&[441000M - Other expenses]
      ,
      ,SELF_AND_AFTER
     ) 
  } ON ROWS 
FROM [Model];
4

1 回答 1

0

我无法完全确定您的关卡名称,但可以在以下位置执行以下操作mdx

WITH 
  MEMBER [Measures].[key] AS 
    [DimGLAcct].[MgtCOA].CurrentMember.UNIQUENAME 
  MEMBER [Measures].[level_] AS 
    [DimGLAcct].[MgtCOA].CurrentMember.level.ordinal 
SELECT 
  { 
    [Measures].[key]
  , [Measures].[level_]
  , [Measures].[Actuals] 
  } ON COLUMNS, 

  [DimGLAcct].[LevelX]
 *[DimGLAcct].[LevelY]
 *[DimGLAcct].[LevelZ]
 *[DimGLAcct].[LevelK]

   ON ROWS 
FROM [Model];

用户层次结构中的每个级别都将具有各自的属性层次结构——在上面使用。

于 2016-02-20T12:02:12.203 回答