Page 1 of 1

Subset create byMDX-aliases

Posted: Fri Jun 15, 2012 10:43 am
by sun
Hello,
i have one question.

Is it possible when i create subset inTI with mdx function... for example:

IF (SubsetExists(dimName, sub1) = 1);
SubsetDestroy(dimName, sub1);
ELSE;
SubsetCreatebyMDX(sub1, '{TM1SORT( {TM1FILTERBYLEVEL( {TM1SUBSETALL( [Product] )}, 0)}, ASC)}');


ENDIF;

To turn on also aliases?

tnx,
regards

Re: Subset create byMDX-aliases

Posted: Fri Jun 15, 2012 11:28 am
by Michel Zijlema
sun wrote:Hello,
i have one question.

Is it possible when i create subset inTI with mdx function... for example:

IF (SubsetExists(dimName, sub1) = 1);
SubsetDestroy(dimName, sub1);
ELSE;
SubsetCreatebyMDX(sub1, '{TM1SORT( {TM1FILTERBYLEVEL( {TM1SUBSETALL( [Product] )}, 0)}, ASC)}');


ENDIF;

To turn on also aliases?

tnx,
regards
Yes, if the SubsetCreateByMDX statement is followed by a SubsetAliasSet statement, like SubsetAliasSet(dimName, sub1, AliasName);

Michel

Re: Subset create byMDX-aliases

Posted: Fri Jun 15, 2012 12:37 pm
by sun
thank you... it helps