Page 1 of 1

fast question about MDX

Posted: Wed Dec 01, 2010 3:01 pm
by stingo
hi,

is it possible to create an MDX passing a variable containing the dimension name instead of a dimension name?

I mean:

SubSetCreateByMDX(vSub,'{TM1FILTERBYLEVEL({TM1SUBSETALL([Variable] )},0)}');
instead of
SubSetCreateByMDX(vSub,'{TM1FILTERBYLEVEL({TM1SUBSETALL([DimensionName] )},0)}');

Re: fast question about MDX

Posted: Wed Dec 01, 2010 3:17 pm
by tomok
SubSetCreateByMDX(vSub,'{TM1FILTERBYLEVEL({TM1SUBSETALL([' | Variable | '] )},0)}');

should do the trick, or you can separate:

MDXStr = '{TM1FILTERBYLEVEL({TM1SUBSETALL([' | Variable | '] )},0)}'
SubSetCreateByMDX(vSub,MDXStr);

Re: fast question about MDX

Posted: Mon Dec 06, 2010 4:43 pm
by stingo
it worked.

thanks for the help.