Database Reference
In-Depth Information
If we click on the Script View button on the toolbar, we are able to see what the MDX
generated actually looks like, and we can also write our own code there if need be:
Here is an example of what the CREATE MEMBER statement for a Profit calculated
measure looks like:
CREATE MEMBER CURRENTCUBE.Measures.[Gross Profit]
AS [Measures].[Sales Amount] - [Measures].[Total Product Cost],
FORMAT_STRING = "#,#.##",
VISIBLE = 1;
This statement creates a new member on the Measures dimension. As you can see,
the expression used to do the calculation is very simple:
[Measures].[Sales Amount] - [Measures].[Total Product Cost]
One point to note here is that we refer to each real measure in the expression
using its Unique Name: for example, the Sales Amount measure's unique name is
[Measures].[Sales Amount] . A unique name is exactly what you'd expect, a way
of uniquely identifying a member among all the members on all the hierarchies
in the cube. You can write MDX without using unique names, just using member
names instead:
[Sales Amount] - [Total Product Cost]
 
Search WWH ::




Custom Search