Hi there
I have a Tm1RptRow expression with the mdx parameter.
Problem:
I need the rows returned by the Mdx to be sorted according to an ALIAS.
Using the Tm1Sort function in the mdx will sort according to the original elements - doesn't allow you to specify alias.
I know that in the Tm1RptRow function itself you can specify the alias you want to display. However, this doesn't help because I want the rows SORTED by the alias.
Any ideas?
Many thanks!
Chris
Tm1RptRow - Mdx Expression with sorting on Alias
-
- MVP
- Posts: 1815
- 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: Tm1RptRow - Mdx Expression with sorting on Alias
You want to use the order function as you would with any attribute type.
Below is an example; you will want to look into the differences between ASC, BASC, DESC and BDESC to get the result you want.
Below is an example; you will want to look into the differences between ASC, BASC, DESC and BDESC to get the result you want.
Code: Select all
{Order({[DIM_NAME].members},[DIM_NAME].[ALIAS_NAME],ASC)}
Declan Rodger
Re: Tm1RptRow - Mdx Expression with sorting on Alias
Brilliant - much appreciated!!!