我对T-SQL很好,但对MDX来说却是一个新手。我在下面的查询中输出类似
的内容Age European | ParameterCaption | ParameterValue | ParameterLevel
-----------------------------------------------------------------
XXX | XXX | XXX | XXX
但是,我希望将Age European
读作我指定的内容,例如The Age
。有任何想法吗?代码如下:
WITH MEMBER [Measures].[ParameterCaption] AS
IIf (
( [Age At Activity].[Age European].CurrentMember .Member_Caption ) = "1 - 4", "01 - 04",
IIf ([Age At Activity].[Age European].CurrentMember .Member_Caption = "5 - 9", "05 - 09", [Age At Activity].[Age European].CurrentMember .Member_Caption )
)
MEMBER [Measures].[ParameterValue] AS
[Age At Activity].[Age European].CurrentMember.UniqueName
MEMBER [Measures].[ParameterLevel] AS
[Age At Activity].[Age European].CurrentMember .Level .Ordinal
SELECT
{ [Measures].[ParameterCaption], [Measures].[ParameterValue], [Measures].[ParameterLevel] } ON COLUMNS,
Order ( [Age At Activity].[Age European].[Age European].Members, [Measures].[ParameterCaption], BASC ) ON ROWS
FROM ReportingPBR
答案 0 :(得分:0)
只需添加此列:
MEMBER [Measures].[The Age] AS
[Age At Activity].[Age European].CURRENTMEMBER.MEMBER_CAPTION