Page 1 of 1

Create a dynamic subset in TI with alias

Posted: Thu Sep 11, 2008 12:21 pm
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

Re: Create a dynamic subset in TI with alias

Posted: Thu Sep 11, 2008 12:40 pm
by bihints.com
add this line after your code:

Code: Select all

SubsetAliasSet(dimensionName,subsetName,'Lib');

Re: Create a dynamic subset in TI with alias

Posted: Sat Sep 13, 2008 3:28 pm
by pobrouwers
Thx
That's work :D