Cube View in descending order as data source in TI

Post Reply
hello123
Posts: 7
Joined: Fri Aug 03, 2012 1:54 pm
OLAP Product: TM1 Cognos
Version: 9.5.2
Excel Version: 2010

Cube View in descending order as data source in TI

Post by hello123 »

Hello everyone,

I am using a cube view as datasource in TI.
I am doing some calculation where I need data in descending order, so the source cube data should flow in data & Metadata tabs in descending order.
I tried using 'Filter option available in cube viewer, but it works only in the cube viewer as 'Filter'option requires only 1 row dimension & column dimension,whereas in TI, the cube view has multiple row dimensions.
I also tried creating dynamic subset using ORDER function in MDX query. Still no desired results!

Can anyone please correct if I am going wrong anywhere. Can we get sorted cube view as datasource in TI?
Or is there any work around for such requirement.
'
Thanks in advance.
declanr
MVP
Posts: 1828
Joined: Mon Dec 05, 2011 11:51 am
OLAP Product: Cognos TM1
Version: PA2.0 and most of the old ones
Excel Version: All of em
Location: Manchester, United Kingdom
Contact:

Re: Cube View in descending order as data source in TI

Post by declanr »

When trying to do anything like this (particularly when I need to sort by date) I find the easiest way is often too leverage the power of a relational database and have a TI export cube data to a temporary table then have your load/calc TI use that as a datasource before deleting the table.
You can also use MDX and create your own loop on smaller data sets.
Declan Rodger
Gabor
MVP
Posts: 170
Joined: Fri Dec 10, 2010 4:07 pm
OLAP Product: TM1
Version: [2.x ...] 11.x / PAL 2.0.9
Excel Version: Excel 2013-2016
Location: Germany

Re: Cube View in descending order as data source in TI

Post by Gabor »

Another way of doing things like that is to build your own While ... End loops on respective TI tabs for those dims, where you wish to have a certain order on.
In that case you have to use a single C-element for these dims in your view. And you need to exclude C-elements in all other dims that are aren't managed in this way.

The more complex a model becomes and especially with large cubes being rule calculated only, the more it can make sense to move into this direction even without the need of a specific sorting. This is simply much faster than traditional processing with zero suppressed views (because you can build in logically checks and skip processing whenever possible).
tomok
MVP
Posts: 2836
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: Cube View in descending order as data source in TI

Post by tomok »

hello123 wrote:Can we get sorted cube view as datasource in TI?
No. Your best option is going to be exporting to an SQL table where you can access using ORDER BY. TM1 doesn't have this.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
User avatar
gtonkin
MVP
Posts: 1260
Joined: Thu May 06, 2010 3:03 pm
OLAP Product: TM1
Version: Latest and greatest
Excel Version: Office 365 64-bit
Location: JHB, South Africa
Contact:

Re: Cube View in descending order as data source in TI

Post by gtonkin »

Are you sorting only on one element/measure or sorting on a value within one or more dimensions/elements?
e.g. If I have an employee cube with 6 dimensions, I may only be sorting by employee based or their salary vs sorting on employees within a cost centre within a year etc.
BR, George.

Learn something new: MDX Views
Wim Gielis
MVP
Posts: 3231
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Cube View in descending order as data source in TI

Post by Wim Gielis »

tomok wrote:
hello123 wrote:Can we get sorted cube view as datasource in TI?
No. Your best option is going to be exporting to an SQL table where you can access using ORDER BY. TM1 doesn't have this.
Or, export to a text file and use some DOS commands. Might be much quicker than going to SQL.
But as always, there are pros and cons to both solutions.
Best regards,

Wim Gielis

IBM Champion 2024-2025
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
lotsaram
MVP
Posts: 3703
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Cube View in descending order as data source in TI

Post by lotsaram »

Someone has done most of the hard work. Here's a template approach to achieving this.
https://everanalytics.wordpress.com/201 ... grator-ti/
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
Post Reply