Page 1 of 1

Mdx expression with comment (really ?)

Posted: Thu Dec 05, 2013 1:36 pm
by Laurent.eisenhower
Just wanted to share with you what strikes me a bit like an oddity (in version 10.2) :

A MDX statement such as for ex :

Code: Select all

 {TM1SUBSETALL( [PPRS_Stores] )}
works perfectly when tested in the expression window of the subset editor (or when used in an active form active via the TM1RPTROW formula)

... but to my surprise the following expression also worked perfectly

Code: Select all

{TM1SUBSETALL( [PPRS_Stores] )} --->Any comment here
Can anyone reproduce this (or is just me and my weird model ) ?

By instinct I would * not * use this to comment my MDX expressions (or could I ?)

Re: Mdx expression with comment (really ?)

Posted: Thu Dec 05, 2013 2:23 pm
by Mike Cowie
Hi Laurent:

I don't think IBM officially says anywhere in their MDX support documentation that they officially support the available commenting options in the MDX language, but based on what you've found it looks like they might support at least the "--" style commenting (at least in 10.2).

You can certainly check with IBM to see if this is deliberate/officially supported and, if yes, you should be fine. If not, then it's probably more of a use at your own risk sort of thing and you might be better off documenting the MDX outside of the where it's stored in TM1. I doubt it would stop working within the same version, but it would be something you'd definitely have to re-validate with each hot fix, fix pack, etc release that you install on the TM1 Server.

Regards,
Mike

Re: Mdx expression with comment (really ?)

Posted: Thu Dec 05, 2013 3:03 pm
by Laurent.eisenhower
Wise words.

Cheers Mike.

Re: Mdx expression with comment (really ?)

Posted: Thu Dec 05, 2013 3:11 pm
by Wim Gielis
Hello Mike

But also without those -- it seems to work.
Text after the last } is fine...

Not that this is something I would do in a TM1 model.

Re: Mdx expression with comment (really ?)

Posted: Thu Dec 05, 2013 7:43 pm
by Mike Cowie
Wim:

That's a little scary/strange, but interesting... hadn't tried that before.

Regards,
Mike