1

我真的需要你的帮助。

对于 SSRS 报告,我有这个 mdx 脚本:

select 
 {[Geographie].[Commune].[AHUY], [Geographie].[Commune].[BRETENIERE]} on columns
,{[Activite].[Branche].&[B], [Activite].[Branche].&[C]} on rows
from [ACSEL2]
where ([Measures].[CATTC], [Perimetre].[Perimetre].&[2], [Temps].[Annee].&[2006])

拜托,我需要为我在列中拥有的成员提供唯一名称

({[Geographie].[Commune].[AHUY], [Geographie].[Commune].[BRETENIERE]})

请你能帮我写这个 mdx 脚本吗?

梨豆

4

2 回答 2

2

使用语句声明一个成员With,如下所示:

WITH MEMBER [Measures].[UniqueName] as [Geographie].[Commune].CurrentMember.UniqueName
Select
--Your select here

有关CurrentMember的更多详细信息

于 2013-02-28T10:24:15.970 回答
0
    WITH 
-- Geography metadata
MEMBER [Measures].[Geographie]
AS StrToValue ( @SelectionGeographie + ".Hierarchy.Currentmember.Uniquename" )
MEMBER [Measures].[Geographie_Label]
AS StrToValue( @SelectionGeographie + ".Hierarchy.CurrentMember.Member_Caption" )

SELECT NON EMPTY {
[Measures].[Geographie],
[Measures].[Geographie_Label],
[Measures].[11 VA]


} ON COLUMNS, 

( STRTOSET ( "{" + @SelectionGeographie + "}") ,


    STRTOSET   ("{" + @SelectionActivite + "}" ))


ON ROWS

 FROM [MyCube]

WHERE STRTOTUPLE ( "(" +@Annee + "," + @Perimetre + ")" )
于 2013-03-04T05:41:21.427 回答