Page 1 of 1

Sorting ASCII Output

Posted: Fri Jun 18, 2010 12:05 pm
by icon
Hi,
I was wondering if anyone had a solution to my problem. I'm exporting data from a view through the TI to a text file, that i need to import into Forecast Pro.
This works fine and the process is exporting all the data I want.

What I want to know is there a way to sort the data that it is being exporting?


Thanks!!

Re: Sorting ASCII Output

Posted: Fri Jun 18, 2010 12:13 pm
by George Regateiro
You could probably achieve this by sorting the subsets you are using in the view. Take a look at the TM1 MDX functions that are available.

Re: Sorting ASCII Output

Posted: Fri Jun 18, 2010 12:27 pm
by icon
Hi George,

I did make use of these MDX functions to create dynamic subsets.
MDX = '{TM1FILTERBYLEVEL({TM1DRILLDOWNMEMBER( {[Items].[All Items]}, ALL, RECURSIVE )},0)}';

Do you know if it is possible so sort it in the same was as the hierarchy that I'm exporting?

Re: Sorting ASCII Output

Posted: Fri Jun 18, 2010 12:40 pm
by George Regateiro
if you look in the reference guide or play around in the subset editor (with the expressions window visible... View -> Expressions Window) you will see a TM1Sort function. I dont know off hand if there are any other MDX functions that might help, you can search the forum for the MDX Primer to use as a reference.

TM1SORT( <set>, ASC|DESC )
This TM1-specific MDX function sorts <set> alphabetically.

ASC sorts A-Z

DESC sorts Z-A

TM1SORTBYINDEX( <set>, ASC|DESC )
This TM1-specific MDX function sorts <set> by the index value of the members.

ASC sorts by ascending index value.

DESC sorts by descending index value.