MDX Essentials: Enhancing CROSSJOIN() with Calculated Members - Page 6
April 4, 2005
10. Type Non-Domestic into the Member name box of the Calculated Member Builder.
11. Click the "+" sign to the immediate left of Store in the Data pane of the Calculated Member Builder.
12. Click the "+" sign to the immediate left of Store Country that appears.
13. Click Canada to select it.
14. Click the Insert button, once Canada is highlighted, to insert the appropriate syntax into the Value expression box just above.
15. Using the keypad under the Insert button, click the "+" sign.
The "+" sign appears in the Value expression box, to the immediate right of the Canada syntax we added in the previous steps.
16. Click Mexico, just under Canada, in the Data pane of the Calculated Member Builder, to select it.
17. Click the Insert button to insert the appropriate syntax for Mexico Stores into the Value expression box just above.
The syntax appears in the Value expression box, to the immediate right of the syntax we added in the previous steps. The Calculated Member Builder, with our additions, appears as shown in Illustration 10.
18. Click the Check button to perform a quick syntax check.
A message box appears, indicating that syntax is valid, as depicted in Illustration 11.
19. Click OK to close the message box.
20. Click OK to accept input and close the Calculated Member Builder.
The Calculated Member Builder closes, and the Non-Domestic calculated member appears in the Calculated Members folder in the Tree Pane.
21. Open the Properties pane underneath the Tree pane, if required.
22. Click the Basic tab of the Properties pane, as necessary.
The Non-Domestic calculated member, with associated Properties pane, Basic tab, appears in the Calculated Members folder in the Tree Pane, as shown in Illustration 12.
23. Click the Data tab to the right of the Properties pane, to access the Cube Editor's Data view.
24. Click the downward arrow for the Store member in the Data Slicing pane, atop the Data view (it displays All Stores, by default).
25. Expand All Stores in the tree that appears, clicking on the "+" sign to its immediate left.
The Stores member expands to the next dimensional level, where, along with the FoodMart Store Countries, we see our new calculated member, Non-Domestic, as depicted in Illustration 13.
We now have a clone cube that resembles the lost production cube in all material respects. Our next steps will be to analyze and enhance the query that has been presented to us by the information consumers. To do this, we will return to the MDX Sample Application.
26. Select File -> Exit to close the Cube Editor, saving the cube when prompted.
27. Exit Analysis Manager when ready.