问题描述
首先,我很抱歉,因为我在这里肯定使用了错误的用语.我的问题是我在下面的查询中包含一个维度,该维度始终具有两个值(MONTH VALIDATION),如查询和下面的图像所示:
firstly i apologize because i'm most certainly using the wrong terms here. My problem is that i have the query below that contains a dimension that has always two values (MONTH VALIDATION) as shown on the query and image below:
SELECT NON EMPTY {
[Measures].[00 - Costs €]
}
ON COLUMNS, NON EMPTY {(
[Project Platoon].[Platoon].[Platoon].ALLMEMBERS ,
[Financial Data Month Validation].[Month Validation Status].[Month Validation Status].ALLMEMBERS
)}
DIMENSION PROPERTIES
MEMBER_CAPTION,MEMBER_UNIQUE_NAME ON ROWS
FROM
[DataCube]
CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS
我得到类似下面的结果:
and i get a result like the one below:
我的问题是:我怎样才能扁平化"这个以便显示出来?
My question is: how can i "flatify" this so that i show
|排|打开|关闭|成本|
|Platoon|Open |Closed|Costs|
| Borg ... | 12.000 | 99.000 | 12 + 99 = 111 |
|Borg...|12.000|99.000|12+99=111|
也就是将[MonthValidation]的值转换为列?
that is, transform the values of [MonthValidation] into columns ?
推荐答案
只需将Month Validation Status
层次结构放在列上(这就是为什么存在ON COLUMNS
和ON ROWS
的原因):
Just put the Month Validation Status
hierarchy on the columns (that is why there is ON COLUMNS
and ON ROWS
):
SELECT NON EMPTY {
[Measures].[00 - Costs €]
} *
[Financial Data Month Validation].[Month Validation Status].[Month Validation Status].ALLMEMBERS
ON COLUMNS,
NON EMPTY {
[Project Platoon].[Platoon].[Platoon].ALLMEMBERS
}
DIMENSION PROPERTIES
MEMBER_CAPTION,MEMBER_UNIQUE_NAME ON ROWS
FROM
[DataCube]
CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS
这篇关于MDX:如何获取尺寸值作为列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!