Report Portal

Alternative Calculated Member Definition Syntax (by Chris Webb)

Now that BOL is being overhauled my list of things that it misses out is getting shorter and shorter...
 
Anyway, did you know that there are two syntaxes you can use to define calculated members in your MDX Script? There's good old CREATE MEMBER, which Visual Studio itself uses, and there's also the more concise CREATE syntax. Here's the BNF:
CREATE  [HIDDEN] [<parent>.]<name> = <expression>
 
Nothing special about it really; just note that if [<parent>] is missing it creates the member on the Measures dimension, and if you need to specify properties such as FORMAT_STRING etc for the calc then you need to either use assignments or edit the DDL of the MDX Script.

Read more...

Tags: mdx

 

2007-2015 VidasSoft Systems Inc.