fast question about MDX

Post Reply
stingo
Posts: 58
Joined: Mon Sep 27, 2010 2:46 pm
OLAP Product: Cognos TM1
Version: 10_1 10_2
Excel Version: 2010
Location: UK, CH, BE

fast question about MDX

Post 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)}');
tomok
MVP
Posts: 2832
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: fast question about MDX

Post by tomok »

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

should do the trick, or you can separate:

MDXStr = '{TM1FILTERBYLEVEL({TM1SUBSETALL([' | Variable | '] )},0)}'
SubSetCreateByMDX(vSub,MDXStr);
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
stingo
Posts: 58
Joined: Mon Sep 27, 2010 2:46 pm
OLAP Product: Cognos TM1
Version: 10_1 10_2
Excel Version: 2010
Location: UK, CH, BE

Re: fast question about MDX

Post by stingo »

it worked.

thanks for the help.
Post Reply