Order MDX dimension values

Greetings to all.

This question could have been asked many times, but I can't find any answer for that, so I'm here to ask an help.

I have an MDX query generating some measures in columns and displacing dimensions in rows, for three different hierarchies. I need to order the first of these dimensions, made by two levels of the OLAP cube with a YEAR information and extracted from a database like the other data, so I can show year values in descending order (such as "this year...this year-3", for example).

The final result should be an exploding cube with descending order by year dimension, then the other dimensions, with a structure kept also when exploded. Is it possible?

My code

SELECT
 
NON EMPTY {[Measures].[STANZIAMENTO INIZIALE],
[Measures].[ASS_VAR], [Measures].[TOTALE STANZIAMENTO],
[Measures].[SUBJUDICE],
[Measures].[NETTO SUBJUDICE],
[Measures].[VBLOC],
[Measures].[ASSEGNAZIONE],
[Measures].[IMP],
[Measures].[IMPORD],
[Measures].[IMPGEN],
[Measures].[IMPVAR],
[Measures].[IMPEGNATO],
[Measures].[DISPONIBILITÀ],
[Measures].[ACCERTATO],
[Measures].[LIQ],
[Measures].[TFP],
[Measures].[RISCOSSO],
[Measures].[PAGATO]} ON COLUMNS,
 
NON EMPTY {(
ORDER(
    ([YEAR.Periodo].[ALL YEAR.Periodos],
    [ESPERIMENTI.Esperimenti].[ALL ESPERIMENTI.Esperimentis],
    [CAP.Capitolo].[ALL CAP.Capitolos]),
    [YEAR.Periodo].[EGE].CurrentMember.Value, DESC)
)} ON ROWS
FROM [CUBO_Bilancio_INFN]


doesn't give any error, but the data remains ordered as before.

Thank You for any suggestion.

samuele.cattabriga's picture
Joined: May 21 2014 - 8:04am
Last seen: 7 years 5 months ago

0 Answers:

No answers yet
Feedback
randomness