Introduction to MSSQL Server 2000 Analysis Services: Distinct Count Basics: Two Perspectives - Page 4
January 10, 2005
12. Click-select Product_Id in the Measures folder, if required.
13. If necessary, click the downward arrow beneath the Cube Tree to open the Properties pane.
14. Click the Basic tab.
15. Modify the default Name of Product Id to the following:
16. Type the following into the empty Description box, just below the Name box:
Distinct Count - Products
17. Click the box to the right of the Aggregate Function property label (at the bottom of the Basic tab), to enable the selector.
18. Select Distinct Count in the Aggregate Function selector.
The Basic tab of the Properties pane appears, with our modifications, as shown in Illustration 8.
19. Click the Data tab, as if going to the Data View to perform a routine browse.
A warning briefly appears, indicating that sample data is being generated, and that the cube requires processing, as a result of our modifications. The sample data then appears, along with a static warning below it, as partially depicted in Illustration 9. The warning ensures that we are aware that the data is not what it might appear to be, and that the cube must be processed to make updated, actual data available.
Let's process the cube to activate our changes.
20. Select File --> Save to save the cube in its modified state.
21. Select Tools --> Process Cube to initialize the processing steps.
A message box appears, stating that the cube has no aggregations, and asking if we wish to design them at this time, as shown in Illustration 10.
NOTE: The message box may not appear, if the cube has been altered with regard to aggregations since its installation as an MSAS sample. If not, the next box will appear instead, skipping this one.
22. Click No to skip designing aggregations at present.
The Select the Processing Method dialog appears.
Full Processing is the default, and only option, as the Warehouse cube has not been processed since the structural change we have made to it.
The Select the Processing Method dialog appears, as depicted in Illustration 11.
23. Leaving settings at default, click OK.
Processing begins, and runs rapidly, as evidenced by the Process viewer's presentation of processing log events in real time. The Processing cycle ends and the success of the evolution is indicated by the appearance of the Processing Completed Successfully message (in green letters) at the bottom of the viewer, as shown in Illustration 12.
24. Click Close.
We are returned to the Cube Editor. We can now browse the data and see our new Distinct Count measure in action.
25. Click the Data tab, if necessary.
On the refreshed Data View, data appears in the default formation, ready for our manipulations and review. A portion of the Data View, depicting the Warehouse Profit and new Product Count measures, appears in Illustration 13.
Now that we have a credible result set with which to compare, let's take a look at replicating the same results using MDX. We can leave the Data View as it is, for easy referral against our next results dataset, which we will generate independently within the MDX Sample Application.