cancel
Showing results for 
Search instead for 
Did you mean: 

Sort output data in MDX queries

Former Member
0 Kudos

Hi,

I wuold obtain a sorted output from my MDX query.

Follow an extract from my mdx code:

the sorted list will be ordered by char APF000050 and APF00048 descendant.

who can help my ?

Thanks in advance

SELECT

{ [Measures].MEMBERS} ON columns ,

NON EMPTY [APF000050].[LEVEL01].MEMBERS

  • [APF000048].[LEVEL01].MEMBERS

  • [APF000063].[LEVEL01].MEMBERS

  • [APF000068].[LEVEL01].MEMBERS

  • [APF000088].[LEVEL01].MEMBERS

*[APF000069].[LEVEL01].MEMBERS

PROPERTIES [APF000088].[2APF000088],[APF000069].[2APF000069]

on rows

FROM [APF_MP_01/AP]

WHERE ( [APF000001].[AP06 0000090106], [APF000095].[2004] )

Message was edited by: Luca Di Benedetto

Solved.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Can you please send the sample mdx for sorting the characteristics. I have problem in doing the same.

Thanks

Sundar

Former Member
0 Kudos

hi sundar

follow working code:

SELECT

{ [Measures].MEMBERS} ON columns ,

NON EMPTY

{ORDER({ [APF000048].[LEVEL01].MEMBERS}, (APF000048),ASC) }

  • {ORDER({ [APF000050].[LEVEL01].MEMBERS}, ([APF000050].[2APF000050]),ASC) }

  • {ORDER({[APF000063].[LEVEL01].MEMBERS},(APF000063),ASC)}

  • [APF000068].[LEVEL01].MEMBERS

  • [APF000088].[LEVEL01].MEMBERS

  • [APF000069].[LEVEL01].MEMBERS

PROPERTIES [APF000088].[2APF000088],[APF000069].[2APF000069]

ON ROWS

FROM [APF_MP_01/MA]

WHERE ( [APF000001].[MAG0460000100043],[APF000048].[datadoc])