Except MDX Function

Post Reply
lm756
Posts: 2
Joined: Thu Jul 04, 2024 3:41 pm
OLAP Product: IBM Planning Analytics
Version: 2.0.96
Excel Version: Version 2404

Except MDX Function

Post by lm756 »

Hi all,

Having a bit of sticky one with getting a bit of MDX to work. The premise is that I want to return in my dynamic report all subprojects under the based on the selected Cost Centre while excluding those that begin with "G".

The code I have constructed is as follow

For reference Cell E13 = FAC01
and Cell E14 = G

=("EXCEPT({GENERATE(TM1FILTERBYLEVEL(DESCENDANTS([Subproject].[Cost Centre].["&$E$13&"]) , 0) , {STRTOMEMBER("&""""&"[Subproject].["&""""&" + [Subproject].[Cost Centre].CURRENTMEMBER.NAME + "&""""&"]"&""""&")}), {TM1FilterByPattern({TM1FilterByLevel({TM1SubsetAll([Subproject])},0)},"""&$E$14)&"*"")}")

Both sets work fine on their own but when combined with the EXCEPT at the beginning it doesn't work. Anyone got any ideas, I'm a bit stumped?

Thanks
Louis
User avatar
Elessar
Community Contributor
Posts: 412
Joined: Mon Nov 21, 2011 12:33 pm
OLAP Product: PA 2
Version: 2.0.9
Excel Version: 2016
Contact:

Re: Except MDX Function

Post by Elessar »

Just copy the MDX to MDX editor in PAW (or any other editor) and check for parentheses consistency.

One thing I've noticed right away: MDX is starting with "EXCEPT(", therefore it should end with ")"
Best regards, Alexander Dvoynev

TM1 and Data Science blog: 10th article - AI has failed TM1 Quiz.
lm756
Posts: 2
Joined: Thu Jul 04, 2024 3:41 pm
OLAP Product: IBM Planning Analytics
Version: 2.0.96
Excel Version: Version 2404

Re: Except MDX Function

Post by lm756 »

Thanks Elessar,

I've checked the parentheses and have got it to work.

Thanks for the tip re MDX editor in PAW :)
Post Reply