Page 1 of 1

Order set in prolog tab in a view created with MDX is no the order running in datatab

Posted: Wed Nov 30, 2022 9:33 pm
by jjramirez
Hi everybody,

I created a view in the prolog tab using a MDX to filter and order a dimension from the source cube
and when I test the MDX in subset editor the elements are shown in the expected order even in the view created by the TI Process elements appears in the expected order but when process go to data tab elements are processed in ASC order...and not as the MDX.
sMDXGrua= '{ORDER( {Filter( { TM1FilterByLevel ( { TM1DrillDownMember ( { [Grua].[Gruas Muelle] },ALL,Recursive) } ,0 ) }
, [R.Operacion.Grua].([R_Version].[ ' | pVersion | ' ], [Periodo.E].[ ' | pPeriodo | ' ], [GPC.Empresa].[ ' | pEmpresa | ' ] ,[Acuerdo].[ ' | pAcuerdo | ' ] , [Grua].CurrentMember, [UVI].[ Total UVIs ],[Medida.Grua].[% Utilizacion Equipo] ) >0 )}
, [R.Operacion.Grua].([R_Version].[ ' | pVersion | ' ], [Periodo.E].[ ' | pPeriodo | ' ], [GPC.Empresa].[ ' | pEmpresa | ' ] ,[Acuerdo].[ ' | pAcuerdo | ' ] , [Grua].CurrentMember, [UVI].[ Total UVIs ],[Medida.Grua].[% Utilizacion Equipo] ),BDESC )}' ;
In pictures attached you can see
1) the order that subset editor return and the order: (26,28,29,27,25...)
2) the order that view created by TI return: (26,28,29,27,25...)
3) the order processed in datatab: (23,24,25,26)

Thank you veru much for any help!

Re: Order set in prolog tab in a view created with MDX is no the order running in datatab

Posted: Thu Dec 01, 2022 8:58 am
by gtonkin
Check out this thread

Re: Order set in prolog tab in a view created with MDX is no the order running in datatab

Posted: Thu Dec 01, 2022 2:42 pm
by jjramirez
Hi gtonkin,

thanks for your reference. I found a solution creating the subset and looping in the prolog tab instead of using the source view.

Re: Order set in prolog tab in a view created with MDX is no the order running in datatab

Posted: Thu Dec 01, 2022 6:41 pm
by Wim Gielis
Indeed looping the alternative, unless you need to go through a lot of sparsity or largish volumes or rules-calculated cells.

Re: Order set in prolog tab in a view created with MDX is no the order running in datatab

Posted: Fri Dec 02, 2022 9:00 am
by Steve Rowe
Is this the same thing as view dimension order though?

OP seems to be talking about element order within the a set being different depending on how the view is accessed?

Since all the other dimensions are pick of single members I can't see why dimension order of view would be impact the set order?

Re: Order set in prolog tab in a view created with MDX is no the order running in datatab

Posted: Fri Dec 02, 2022 9:11 am
by gtonkin
Looks like I jumped the gun here and assumed the current MDX view discussion.

Does look curious - What is set in prolog for the DataSourceNameForServer etc? Need to see what is happening in prolog to build and reference the set.