Optimizing Microsoft SQL Server Analysis Services: MDX Optimization Techniques: Considering DISTINCT COUNT

6. Right-click on the Warehouse sample cube.

7. Select Edit from the context menu that appears, as shown in Figure 3.

Figure 3: Select Edit from the Context Menu

The Cube Editor opens. The Schema tab appears as depicted in Figure 4.


Figure 4: Cube Editor – Schema Tab for the Warehouse Sample Cube

We will be creating a measure in the Cube Editor to enable us to make our distinct Product counts. Distinct Count can only exist within the context of a measure.

8. Right-click the Measures folder in the Tree View to the left of the Schema tab.

A single-line context menu appears, as shown in Figure 5.

9. Select New Measure from the context menu.

Figure 5: Select New Measure from the Context Menu

The Insert Measure dialog appears.

10. Click-select product_id.

The Insert Measure dialog, selected measure circled in red, appears in Figure 6.

Figure 6: Select Product_Id from the Insert Measure Dialog

Continues…

Leave a comment

Your email address will not be published.