Page 1 of 1

View extract - incorrect sort order when exporting

Posted: Thu Jul 03, 2014 6:26 pm
by mvaspal
Hi

Trying to export a 2-dimensional cube to a txt file where the order of elements is important in one of the dimensions.
So I create the static subset with the correct order (also tried with dynamic) and assign it to the source cube view.
When I open it from cube viewer it looks fine but when the TI uses it as a view extract it seems that the subset get automatically reordered to the original dimension order.

Any idea?

CX 10.2.1

Thanks
Matyas

Re: View extract - incorrect sort order when exporting

Posted: Thu Jul 03, 2014 7:05 pm
by tomok
This is the expected behavior for the export function. Disappointing but that's the way it is. If you need the data in a certain order you'll either have to sort the file yourself after the fact or do your own walk through the subsets in the Prolog tab using CellGetN and ASCIIOutputs inside WHILE loops.

Re: View extract - incorrect sort order when exporting

Posted: Thu Jul 03, 2014 7:45 pm
by mvaspal
Hi

Actually your idea can work for me as we are talking about a simple attribute cube, only 2 dims, so thanks very much for this!
This is the expected behavior for the export function
Surely not what I would expect :)
I think it is not the export function but how TM1 handles the view extract. I presume if I was loading from one cube to the another, the same would happen.

Re: View extract - incorrect sort order when exporting

Posted: Thu Jul 03, 2014 7:50 pm
by Wim Gielis
Indeed, expected behavior and how TM1 handles things internally.

For an article on exactly the same topic (you were not the first to ask this question), see on my site an article from October 2011: Sorting TM1 text output
( http://users.skynet.be/fa436118/wim/tm1 ... ort_EN.htm )

Re: View extract - incorrect sort order when exporting

Posted: Fri Jul 04, 2014 8:18 am
by mvaspal
thanks a million Wim, I have been lucky enough not to hit into this until now