Presentation is loading. Please wait.

Presentation is loading. Please wait.

Module 7: Working with Measures and Measure Groups

Similar presentations


Presentation on theme: "Module 7: Working with Measures and Measure Groups"— Presentation transcript:

1 Module 7: Working with Measures and Measure Groups
Course 10778A Module 7: Working with Measures and Measure Groups Module 7 Working with Measures and Measure Groups

2 Module 7: Working with Measures and Measure Groups
Course 10778A Module Overview Module 7: Working with Measures and Measure Groups Working with Measures Working with Measure Groups

3 Lesson 1: Working with Measures
Course 10778A Lesson 1: Working with Measures Module 7: Working with Measures and Measure Groups Introducing Measures Measure Properties Configuring How Measures Are Displayed Aggregation Functions

4 Module 7: Working with Measures and Measure Groups
Course 10778A Introducing Measures Module 7: Working with Measures and Measure Groups Measures: Are values in a fact table Are typically numeric and aggregated Can be calculated from other measures

5 Module 7: Working with Measures and Measure Groups
Course 10778A Measure Properties Module 7: Working with Measures and Measure Groups Measure properties include: How measures are aggregated The column in the data source view to which the measure is bound The name that is displayed The folder in which the measure will appear when users connect to the cube The display format Any MDX expressions that define the measure The visibility of the measure

6 Configuring How Measures Are Displayed
Course 10778A Configuring How Measures Are Displayed Module 7: Working with Measures and Measure Groups Source data type Format Display format value Example output Numeric Named General Number Explain that the formatting is applied in clients that support it. Fixed User-defined $#,#.00 $123,456,789.00 #,#0.0000 123,456, Date/time Named Medium Date 31-Dec-06 Long Date Sunday, December 31, 2006 User-defined mm/dd/yyyy 12/31/2006 mmm-dd-yyyy Dec Boolean Named Yes/No Yes True/False True

7 Aggregation Functions
Course 10778A Aggregation Functions Module 7: Working with Measures and Measure Groups 20,000 15,999 4,000 31,123 16,000 ?,???? Aggregation functions can be: Additive Semiadditive Nonadditive

8 Lesson 2: Working with Measure Groups
Course 10778A Lesson 2: Working with Measure Groups Module 7: Working with Measures and Measure Groups Introducing Measure Groups Measure Group Properties Relationships Between Measure Groups and Dimensions Aggregations Configuring Measure Group Storage Partitions

9 Introducing Measure Groups
Course 10778A Introducing Measure Groups Module 7: Working with Measures and Measure Groups Measures groups define collections of related measures By default, a measure group is created for each fact table A measure group defines: The dimensions the measures can be aggregated by The granularity at which the measures are related to the dimensions How measure aggregations should be stored

10 Measure Group Properties
Course 10778A Measure Group Properties Module 7: Working with Measures and Measure Groups AggregationPrefix DataAggregation ErrorConfiguration EstimatedRows and EstimatedSize ID IgnoreUnrelatedDimensions ProactiveCaching ProcessingMode and Processing Priority StorageLocation and StorageMode Type

11 Relationships Between Measure Groups and Dimensions
Course 10778A Relationships Between Measure Groups and Dimensions Module 7: Working with Measures and Measure Groups Regular: When the key column for a dimension is joined directly to the fact table Reference: When the key column for a dimension is joined indirectly to the fact table Fact: Standard dimensions that are constructed from attribute columns in fact tables instead of dimension tables Many-to-many: When a single fact is joined to multiple dimension members

12 Module 7: Working with Measures and Measure Groups
Course 10778A Demonstration: Defining Relationships Between Dimensions and Measure Groups Module 7: Working with Measures and Measure Groups In this demonstration, you will see how to: Define a referenced relationship Task 1: Define a referenced relationship Ensure that the MIA-DC1 and MIA-SQLBI virtual machines are both running, and then log on to MIA- SQLBI as ADVENTUREWORKS\Student with the password Pa$$w0rd. Then in the D:\10778A\Demofiles\Mod07 folder, run Setup.cmd as Administrator. In the D:\10778A\Demofiles\Mod07 folder, double-click Adventure Works OLAP.sln to open the solution in SQL Server Data Tools. In Solution Explorer, right-click Adventure Works OLAP and click Deploy. If prompted, specify the user name ADVENTUREWORKS\Student and the password Pa$$w0rd. In Solution Explorer, double-click Adventure Works Cube.cube, and on the Browser tab, expand Measures and Internet Sales and drag the Sales Amount measure to the Drag levels or measures here to add to the query area. Then expand the Geography dimension and drag Country-Region to the left of the Sales Amount value. Note that the values for each region are the same. The aggregation is incorrect. In Solution Explorer, right-click Geography.dim, and then click View Designer. Note that this dimension is based on the Geography table and has a Country-Region attribute. In Solution Explorer, right-click Customer.dim, and then click View Designer. Note that this dimension is based on the Customer table, which includes a GeographyKey attribute that relates it to the Geography table. Click the tab for the Adventure Works Cube.cube, and on the Cube Structure tab, in the Data Source View pane, note that there is no direct relationship between the InternetSales fact table and the Geography dimension table. On the Dimension Usage tab, click the intersection of the Internet Sales measure group and the Geography dimension, click the ellipses (…) button. In the Select relationship type list, select Referenced. In the Intermediate dimension list, select Customer. In the Reference dimension attribute list, select Geography Key, and in the Intermediate dimension attribute list, select Geography Key. Click OK. Click the tab for the Adventure Works Cube.cube, and on the Browser tab, click the Reconnect button. Then in the data grid area, click the Click to execute the query link. Note that the values for each region are now correct. On the Dimension Usage tab, in the Dimensions list, right-click Geography, and then click Rename. Change the name of this cube dimension to Reseller Geography, and then press Enter to make this name change take effect.

13 Module 7: Working with Measures and Measure Groups
Course 10778A Aggregations Module 7: Working with Measures and Measure Groups Aggregations: Are precalculated summaries of leaf data Give multidimensional cubes their performance benefits Typically provide the best performance when only a proportion are precalculated

14 Configuring Measure Group Storage
Course 10778A Configuring Measure Group Storage Module 7: Working with Measures and Measure Groups MOLAP Discuss scenarios when you might use the different storage models. Also mention that the Tabular Data Model is an alternative and is covered in module 10. ROLAP HOLAP

15 Module 7: Working with Measures and Measure Groups
Course 10778A Partitions Module 7: Working with Measures and Measure Groups SSAS Enterprise Edition uses partitions to manage and store data and aggregations for a measure group in a cube When you incrementally update a partition, a temporary partition is created that has an identical structure to the source partition You can partition a measure group horizontally or vertically

16 Module 7: Working with Measures and Measure Groups
Course 10778A Lab Scenario Module 7: Working with Measures and Measure Groups Business users are performing analysis of Internet sales with the multidimensional cube you have created. However, they also need to analyze reseller sales. You have reseller sales data in the data warehouse on which the cube is based, so you plan to add a second measure group containing the reseller measures. Users have also requested that you remove some measures that they do not need to use when analyzing data, and ensure that the remaining measures are clearly named. Users specifically need to analyze reseller sales by product, so you must ensure that the cube supports the required relationship between the new reseller sales measure group and the Product dimension Finally, the data center administrator is concerned about the disk space used by the cube, but your users are concerned about performance when analyzing Internet sales. You must optimize the storage and aggregations of the cube to balance these concerns. Students will perform the lab in the role of a BI professional in the Adventure Works Cycles company, and: Add a measure group and modify measures Define a relationships between the Reseller Sales measure group and the Product dimension Configure measure group storage and aggregations Point out that the instructions in the lab are deliberately designed to be high-level so that students need to think carefully about what they are trying to accomplish and work out how best to proceed for themselves. Encourage students to read the scenario information carefully and collaborate with each other to meet the scenario requirements. Remind students that if they find a particular task or exercise too challenging, they can find step-by-step instructions in the lab answer key.

17 Lab 7: Configuring Measures and Measure Groups
Course 10778A Lab 7: Configuring Measures and Measure Groups Module 7: Working with Measures and Measure Groups Exercise 1: Configuring Measures Exercise 2: Defining a Regular Relationship Exercise 3: Configuring Measure Group Storage In this lab, students will configure measures and measure groups in the Adventure Works OLAP cube. Exercise 1 In this exercise, students will create and modify measure groups. Exercise 2 In this exercise, students will create a regular relationship. Exercise 3 In this exercise, students will configure the storage mode of a measure group and design aggregations for a measure group. Logon information Virtual machine MIA-SQLBI User name ADVENTUREWORKS\Student Password Pa$$w0rd Estimated time: 60 minutes

18 Module Review and Takeaways
Course 10778A Module Review and Takeaways Module 7: Working with Measures and Measure Groups Give an example of an additive measure, a semiadditive measure, and a nonadditive measure. What are the two ways in which you can partition a measure group? How can you use aggregations to improve query response time? Review Questions Point the students to the appropriate section in the course so that they are able to answer the questions presented in this section. Some guidance for discussing the answers to the questions is included below. Give an example of an additive measure, a semiadditive measure, and a nonadditive measure. Additive: Sales Amount in a Sales measure group, which for example can be aggregated by Sum across all dimensions. Semiadditive: Balance in an Accounts measure group, which can be aggregated by Sum across customers but by LastNonEmpty when aggregated by time. Nonadditive: Profit Margin in a Sales measure group. What are the two ways in which you can partition a measure group? Horizontal and vertical. How can you use aggregations to improve query response time? Aggregations improve query response time by preparing the answers before the questions are asked.


Download ppt "Module 7: Working with Measures and Measure Groups"

Similar presentations


Ads by Google