View extract - incorrect sort order when exporting

Post Reply
mvaspal
Community Contributor
Posts: 341
Joined: Wed Nov 03, 2010 9:16 pm
OLAP Product: tm1
Version: 10 2 2 - 2.0.5
Excel Version: From 2007 to 2013
Location: Earth

View extract - incorrect sort order when exporting

Post 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
tomok
MVP
Posts: 2832
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: View extract - incorrect sort order when exporting

Post 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.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
mvaspal
Community Contributor
Posts: 341
Joined: Wed Nov 03, 2010 9:16 pm
OLAP Product: tm1
Version: 10 2 2 - 2.0.5
Excel Version: From 2007 to 2013
Location: Earth

Re: View extract - incorrect sort order when exporting

Post 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.
Wim Gielis
MVP
Posts: 3120
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: View extract - incorrect sort order when exporting

Post 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 )
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
mvaspal
Community Contributor
Posts: 341
Joined: Wed Nov 03, 2010 9:16 pm
OLAP Product: tm1
Version: 10 2 2 - 2.0.5
Excel Version: From 2007 to 2013
Location: Earth

Re: View extract - incorrect sort order when exporting

Post by mvaspal »

thanks a million Wim, I have been lucky enough not to hit into this until now
Post Reply