New to MDX Questions

Post Reply
User avatar
George Regateiro
MVP
Posts: 326
Joined: Fri May 16, 2008 3:35 pm
OLAP Product: TM1
Version: 10.1.1
Excel Version: 2007 SP3
Location: Tampa FL USA

New to MDX Questions

Post by George Regateiro »

I am getting into the use of MDX through TI for the first time and have encountered some behavior that seems strange to and could use some assistance.

First a little background ont the model

I have 2 dimensions that are very similar the FcstJob and FcstJobD. The only difference is that every n level node in the FcstJob is a parent in the FcstJobD dimension.

I have this line of code in my TI

Code: Select all

SubsetCreatebyMDX('ztempcopyprocessD', '{TM1FILTERBYLEVEL( {TM1DRILLDOWNMEMBER( {TM1FILTERBYPATTERN( {TM1SUBSETALL( [FcstJobD] )}, '| JobD|')}, ALL, RECURSIVE )}, 0)}');
Where the JobD variable is being passed into the TI. When I run the process I get the following error

Error: Prolog procedure line (43): Could not create dynamic subset: Level or member name "MA_A0100" ambiguous: found in dimensions "FcstJobD", "FcstJob"

I understand that this is because the same node exists in both, but the subset I am trying to create is only on the FcstJobD and that is all the function references. If I paste the code into the subset editor is works.

What am I doing wrong? I have tried reading the docs, but that has not gotten me far.
ScottW
Regular Participant
Posts: 152
Joined: Fri May 23, 2008 12:08 am
OLAP Product: TM1 CX
Version: 9.5 9.4.1 9.1.4 9.0 8.4
Excel Version: 2003 2007
Location: Melbourne, Australia
Contact:

Re: New to MDX Questions

Post by ScottW »

Hi George,

It looks like your TI expression started out its life being recorded in the subset editor (not that there's anything wrong with that, I'm no MDX expert and I do that myself all the time.)

You are using TM1FILTERBYPATTERN to pick the element by a string match after a SUBSETALL. You don't need to do this as you can use the MDX to select the element directly.
ie you can replace {TM1FILTERBYPATTERN( {TM1SUBSETALL( [FcstJobD] )}, '| JobD|')}
with {[FcstJobD].['| JobD |']}

This shouldn't be a problem as you know the identity of "JobD". This has the advantage of simpler and less code and the dimension is specified so the ambiguous name shouldn't cause an error (I haven't tested as I don't have a suitable db open but this should work for you.)
Cheers,
Scott W
Cubewise
www.cubewise.com
User avatar
George Regateiro
MVP
Posts: 326
Joined: Fri May 16, 2008 3:35 pm
OLAP Product: TM1
Version: 10.1.1
Excel Version: 2007 SP3
Location: Tampa FL USA

Re: New to MDX Questions

Post by George Regateiro »

Thanks Scott that worked.
Post Reply