Create a Calculation Measure Using the Calculation Wizard


Create a Calculation Measure Using the Calculation Wizard

In this topic, you use the Calculation Wizard to define a new calculation measure named Share of Category in the Sales Facts logical table.
To create a calculation measure using the Calculation Wizard, perform the following steps:
1.Return to the SH repository, which should still be open in online mode in the Administration Tool.
2.Right-click the Amount Sold logical column and select Duplicate.

3.A new column named Amount Sold#1 is added to the business model.

4.Rename Amount Sold#1 to Category Sales.

5.Double-click Category Sales to open the Logical Column dialog box.
6.Click the Levels tab and select Category as the logical level for ProductsDim.

Category Sales is now a level-based measure that will calculate total sales at the category level when used in a query. Level-based measures are useful for creating share measures. You use the Calculation Wizard to create a share measure in the steps that follow.
7.Click OK to close the Logical Column dialog box.
8.Right-click Amount Sold and select Calculation Wizard.

The Calculation Wizard opens.

9.Click Next.
10.Check Category Sales as the column to compare with Amount Sold.

11.Click Next.
12.Uncheck Change and Percent Change and check Percent.

13.Change Calculation Name to Share of Category.

14.Click Next.

15.Click FinishShare of Category is added to the business model.

16.Drag Category Sales and Share of Category to Sales Facts in the Presentation layer.

17.Check in changes.
18.Click Yes when prompted to check global consistency. If the repository is consistent (no Error messages), close the Consistency Check Manager. If there are Error messages, you must correct the errors before continuing.
19.Save the repository.
20.Return to Answers, which should still be open from the previous topic.
21.Click Reload Server Metadata.
22.Expand Sales Facts and verify that Category Sales and Share of Category are now visible in Answers.

23.Place the cursor over the icon to display the screenshot and use it as a reference to create a query. Notice the sort settings for the Prod Category and Amount Sold columns.

24.Expand the Times folder.
25.Hold down the Ctrl key and click the Calendar Year column to open the Create/Edit Filter dialog box.

26.Click the All Choices link.

27.Click 2001 to add it to the Value field.

28.Click OK to close the Create/Edit Filter dialog box. The filter is added to the request.

29.Click Results. Only partial results are shown in the picture.

30.Leave Answers open.


No comments:

Post a Comment

Popular Posts