Create a dynamic subset in TI with alias

Post Reply
pobrouwers
Posts: 34
Joined: Mon Aug 11, 2008 7:37 pm
OLAP Product: IBM Cognos TM1
Version: 9.5.2
Excel Version: 2003-2007
Location: France

Create a dynamic subset in TI with alias

Post by pobrouwers »

Hello,

I use this code to create a dynamic subset in TI

Code: Select all

###########################################
#         Create Dynamic Subset
###########################################

subsetName = operationTechno;
stringMDX = '{FILTER( {TM1SUBSETALL( ['| dimensionName |'] )}, [' | dimensionName | '].[Operation/Technology] = ' | '"' | subsetName | '" )}';

if(SubsetExists(dimensionName,subsetName)=0);
  subsetcreatebyMDX(subsetName,stringMDX);
endif;
That's work fine but I would like to see the alias in my dimension and not the item. The alias name is 'Lib'

An idea ?

Thx
User avatar
bihints.com
Posts: 52
Joined: Tue May 20, 2008 8:56 am
OLAP Product: TM1
Version: 9.0.3
Excel Version: 2003
Contact:

Re: Create a dynamic subset in TI with alias

Post by bihints.com »

add this line after your code:

Code: Select all

SubsetAliasSet(dimensionName,subsetName,'Lib');
pobrouwers
Posts: 34
Joined: Mon Aug 11, 2008 7:37 pm
OLAP Product: IBM Cognos TM1
Version: 9.5.2
Excel Version: 2003-2007
Location: France

Re: Create a dynamic subset in TI with alias

Post by pobrouwers »

Thx
That's work :D
Post Reply