Use an Action
Now let's examine the operation of the Action we have created - from the perspective of an information consumer.
1. Select File --> Save from the top menu in the Cube Editor to save our work to date.
2. Click the Data tab at the bottom right of the Cube Editor.
The default display of the data appears in the data pane. Let's move the Store dimension to the row axis so that we can easily review the operation of the Action we have created.
3. Drag the Store dimension bar from the top of the data pane to drop it over the Customer dimension column heading (labeled Country) in the data view, as necessary.
The Store dimension replaces the Customer dimension on the row axis, as shown in Illustration 9.
4. Double-click the USA level in the row axis to drill down to the State level.
The State level appears.
5. Double-click the OR store-state to drill down to the Oregon store-cities.
We see the Cities of Portland and Salem appear.
6. Double-click Portland to drill to the actual Store level.
Store 11 of Portland appears. The data view appears as depicted in Illustration 10.
Illustration 10: Data View after Drill-Down to Store 11 (Partial View)
7. Right-click on Store 11.
The context menu appears, and displays the new Action, as shown in Illustration 11.
Illustration 11: Selecting the New Action for Store 11
Recall that we set the target for the Action to be at "a level in this cube," at the Store Name level of the Store dimension,
8. Click ANSYS21 1 on the context menu.
The default browser (mine is Internet Explorer) is launched, and the HTML page appears as shown in Illustration 12.
Illustration 12: The Action-Generated HTML Page in the Browser
We note, also, in the address bar, the temporary storage place to which the operation of the Action has directed the HTML file it has produced.
The Action we have created thus presents us with an HTML page, after launching the browser, with simple details about the Store on which we clicked from the Data view inside MSAS. The data is retrieved from the cube using simple MDX. Specifically, it returns the name of the Store (Store 11) and the location of the Store, which, in the cube structure, equates to the parent of the Store member. MDX also renders the three member properties defined for Store 11: the Manager name, the Store Type, and the square footage of the Store.
We can perform the Action for any store in our cube, although some in the sample sales cube have not been assigned square footage, or perhaps other, values.
Once you feel comfortable with your understanding of the functionality, you can leave the Cube Editor.
9. Select File --> Exit when ready to leave the Cube Editor, saving if requested.
10. Exit Analysis Services in similar fashion, when ready.
In this article, we began an exploration of MSAS Actions. We set out to first gain an understanding of the nature of Actions, focusing on their Types, possible uses, and the choices we have for points of information consumer interaction (Targets). We then activated what we learned, reinforcing the concepts within a rudimentary practice exercise that allowed us to see the end-to-end process for creating a simple Action for a regular cube.
In our next article, we will extend our examination of Actions to a discussion of creating and using Actions within virtual cubes. After considering the differences in the regular and virtual cube scenarios, we will create and import Actions into a virtual cube within illustrative practice exercises.
» See All Articles by Columnist William E. Pearson, III
Discuss this article in the MSSQL Server 2000 Analysis Services and MDX Topics Forum.