Sort subset elements by an attribute

Post Reply
JJ2
Posts: 19
Joined: Sun May 09, 2010 11:28 pm
OLAP Product: TM1
Version: 9.5
Excel Version: 2007

Sort subset elements by an attribute

Post by JJ2 »

Hi Everyone,

I am new to TM1. I have a dimension with 4 levels. I would like to creat a subset using MDX to filter the dimension on the lowest level and then sort it by one of the dimension attributes. I would appreciate any help with the syntax for this.

Thanks!
User avatar
Oratia623
Posts: 40
Joined: Mon Apr 27, 2009 5:36 am
OLAP Product: TM1/PA/CA
Version: V7.x to 2.0.9+
Excel Version: All
Location: Sydney, Australia

Re: Sort subset elements by an attribute

Post by Oratia623 »

Here you go:
{ORDER( {TM1FILTERBYLEVEL( {TM1SUBSETALL( [dimensionname] )}, 0)}, [dimensionname].[attribute],ASC )}

Substitute your dimension name and attribute name.
The ASC at the end denotes ascending order, you can change this to DESC to sort in decending order.

Paul
Paul Williamson
____________________________________________________________________________________
I came. I saw. I did not concur.
JJ2
Posts: 19
Joined: Sun May 09, 2010 11:28 pm
OLAP Product: TM1
Version: 9.5
Excel Version: 2007

Re: Sort subset elements by an attribute

Post by JJ2 »

Thanks Paul!
Post Reply