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!
Sort subset elements by an attribute
- 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
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
{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.
____________________________________________________________________________________
I came. I saw. I did not concur.
Re: Sort subset elements by an attribute
Thanks Paul!