简体   繁体   中英

MDX Hierarchy Dimension to Column

I have a cube having a dimension using hierarchy. This is the example of pivot cube from Excel using pivot level

在此处输入图像描述

This data are attached as one hierarchy drill down from Excel pivot

在此处输入图像描述

When I translated it to MDX query:

SELECT NON EMPTY {[VALUE] } ON COLUMNS
, NON EMPTY { 
{[PROFITLEVEL].[Profit Center].&[Level02],[Profit Center].&[Level03],[Profit Center].&[Level04],[Profit Center].&[Level05]}

} 
 DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS 
 
 FROM  [CUBE])

I can't create as a picture from Excel pivot, which is data translated to each column (Level 2, 3, 4, 5)

This is result from the query

在此处输入图像描述

The data becomes duplicated.

The depth you are going to I think means that each set of members contains an All member. You need to go a bit further down in each hierarchy eg

[PROFITLEVEL].[Profit Center].&[Level02].&[Level02]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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