na2009 enus biip_07

14
Chapter 7: Data Analysis using Microsoft Office Components 7-1 CHAPTER 7: DATA ANALYSIS USING MICROSOFT OFFICE COMPONENTS Objectives The objectives are: Build a pivot table in Microsoft ® Office Excel ® . Build a pivot chart in Microsoft Office Excel. Introduction The aggregation of the capability of Microsoft ® SQL Server ® Analysis Services with Microsoft Office Excel 2007 analytical facilities provides the ability to analyze data, create reports on this data, and build diagrams and other graphical reports. This chapter describes how to use Microsoft Office Excel as an alternative online analytical processing (OLAP) client application. As an alternative client application, it used to perform a business intelligence analysis on the data from the Business Analytics database configured in Chapter 3, "Configuring a Business Analytics Database in Microsoft Dynamics NAV". Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Upload: peter-muscat

Post on 01-Nov-2014

690 views

Category:

Technology


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Na2009 enus biip_07

Chapter 7: Data Analysis using Microsoft Office Components

7-1

CHAPTER 7: DATA ANALYSIS USING MICROSOFT OFFICE COMPONENTS Objectives

The objectives are:

• Build a pivot table in Microsoft® Office Excel®. • Build a pivot chart in Microsoft Office Excel.

Introduction The aggregation of the capability of Microsoft® SQL Server® Analysis Services with Microsoft Office Excel 2007 analytical facilities provides the ability to analyze data, create reports on this data, and build diagrams and other graphical reports. This chapter describes how to use Microsoft Office Excel as an alternative online analytical processing (OLAP) client application. As an alternative client application, it used to perform a business intelligence analysis on the data from the Business Analytics database configured in Chapter 3, "Configuring a Business Analytics Database in Microsoft Dynamics NAV".

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 2: Na2009 enus biip_07

Business Intelligence for IT Professionals in Microsoft Dynamics® NAV 2009

7-2

Building Pivot Tables in Microsoft Office Excel The core of the business intelligence capabilities of Microsoft Office Excel is a pivot table. Pivot tables are used for creating reports that facilitate the analysis. In a similar way to pivot tales in other OLAP clients, such as Microsoft SQL Server Management Studio, pivot tables are used to manipulate data to make an analysis from various perspectives. The client component of the pivot table helps to visualize the relationship between dimensions and facilitate the understanding of the analysis results. Pivot tables are used to view multidimensional data in a two-dimensional table, but usually only two or three dimensions are used for a single analysis. Adding a big number of dimensions can result in a complicated data output difficult to analyze.

Pivot tables can be created on the basis of tables saved in Office Excel or on the basis of another source which Office Excel has an access to. In this case, the database created for the scenario in Chapter 3, "Configuring a Business Analytics Database in Microsoft Dynamics NAV," will serve as a source. The database is already configured on the Microsoft SQL Server Analysis Services side.

NOTE: The only requirement for using pivot tables in Office Excel with Microsoft SQL Server Analysis Services is that Office Excel must be connected to the Analysis Services instance. In that case the Analysis Services becomes a source for Office Excel.

There is a tight integration between Office Excel and Analysis Services. Office Excel can identify objects and models from Analysis Services and represent them to the final user efficiently.

Demonstration: Creating a Pivot Table in Microsoft Office Excel

This demonstration establishes a connection between Microsoft Office Excel and the Business Analytics database configured in Chapter 3, "Configuring a Business Analytics Database in Microsoft Dynamics NAV." The data from the Sales and Purchase Efficiency virtual cube in that database is used to build a pivot to meet the business intelligence tasks for Kevin, the Sales Manager, from the scenario in the same chapter. In particular, the pivot table provides data for Kevin to view the sold items aggregated by customers for a time period, and analyze the item amount and gross margin. The items must be from the transactions in local currency which means only with domestic customers.

NOTE: Since the Business Analytics (BA) database used in the demonstration is already configured in Microsoft SQL Server Analysis Services and the data in Microsoft Dynamics NAV has not changed, there is no need to rerun the Configurator for SQL 2008 or for SQL 2005. However, it is necessary to run the Configurator from Microsoft Dynamics NAV again to update the data in the BA database on the Analysis Services side in case any changes were made to the data in Microsoft Dynamics NAV.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 3: Na2009 enus biip_07

Chapter 7: Data Analysis using Microsoft Office Components

7-3

To build a pivot table, use the following procedure:

Establishing a Connection Between Office Excel and Microsoft SQL Server Analysis Services

1. In Microsoft Office Excel, on the Data tab, click From Other Sources > From Analysis Services to open the Data Connection Wizard window.

FIGURE 7.1 THE DATA CONNECTION WIZARD WINDOW

2. In the Server name field, enter “Localhost" as the name of the server to connect to.

3. Click Next. 4. Select the Trade Analysis database from a drop-down list.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 4: Na2009 enus biip_07

Business Intelligence for IT Professionals in Microsoft Dynamics® NAV 2009

7-4

5. Select the Connect to a specific cube or table check box. 6. Select the Sales and Purchase Efficiency cube because this cube

contains the data required for the given analysis.

FIGURE 7.2 SPECIFYING A CONNECTION TO A DATABASE AND A CUBE

7. Click Finish. 8. In the Import Data window, select Only Create Connection.

FIGURE 7.3 THE IMPORT DATA WINDOW

9. Click OK.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 5: Na2009 enus biip_07

Chapter 7: Data Analysis using Microsoft Office Components

7-5

Building a Pivot Table Report

1. On the Data tab, click Existing Connections to open the Existing Connections window.

FIGURE 7.4 THE EXISTING CONNECTIONS WINDOW

2. Select the connection established between Office Excel and the Sales and Purchase Efficiency cube and click Open.

3. In the Import Data window, select the PivotTable Report option and leave the default value in the Existing worksheet field.

4. Click OK.

NOTE: After a connection is established between Office Excel and Analysis Services and the cube to work with is selected, the data source can always be changed by clicking Change Data Source on the Options tab and selecting Change Data Source > Choose Connection. This is useful to change the source cube without establishing a new connection. This method is not applicable if a connection is not established between Office Excel and the cube being switch to, and it is necessary to first create a new connection as described in the Establishing a Connection Between Office Excel and Microsoft SQL Server Analysis Services section.

5. In the PivotTable Field List pane, select Amount and Quantity measures from the SalesInvoiceLine measure group and the Gross Margin calculated value from the Values group.

6. Right-click the Customer and the Sales Invoice Line No_ dimensions and select Add to Row Labels.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 6: Na2009 enus biip_07

Business Intelligence for IT Professionals in Microsoft Dynamics® NAV 2009

7-6

7. Right-click the Posting Date dimension and select Add to Column Labels.

8. Expand the More Fields node under the Posting Date dimension. 9. Select the Quarter check box. 10. Select the Description check box under the Sales Invoice Line Type

dimension. 11. In the Drag fields between areas below pane, drag the Description

label from the Row Labels pane to the Report Filter one. 12. In the PivotTable Field List pane, click the AssistButton next to the

Description check box under the Sales Invoice Line Type dimension.

13. In the opened window, select the Select Multiple Items check box. 14. Expand the All Sales Invoice Line Type node and select Item. 15. Click OK. 16. In the PivotTable Field List pane, select the Currency dimension. 17. Drag the Currency label from the Row Labels pane to the Report

Filter one. 18. In the PivotTable Field List pane, click the AssistButton next to the

Currency check box under the Currency dimension. 19. In the opened window, select the Select Multiple Items check box. 20. Expand the All Currency node and select n/a (the one between

MZM and NGN).

NOTE: In Microsoft Dynamics NAV, there is a blank value used for the local currency. In Microsoft Office Excel, the blank values are replaced with n/a just as in Microsoft SQL Server Management Studio.

21. Click OK. 22. Click the pivot table area, and then click the Design tab. 23. Click Subtotals > Do Not Show Subtotals to hide the calculated

subtotals for each customer. 24. Click Grand Totals > Off for Rows and Columns to hide the

calculated grand totals.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 7: Na2009 enus biip_07

Chapter 7: Data Analysis using Microsoft Office Components

7-7

The pivot table report displaying data ready for a business intelligence analysis looks like the following:

FIGURE 7.5 THE PIVOT TABLE IS BUILT

Building Pivot Charts Pivot table reports already provide sufficient information to perform business intelligence tasks. But there is also a graphical way to display data by building pivot charts. Diagrams represent an excellent way of making the results clear to users. Pivot charts are based on pivot tables and use their values to generate a graphical presentation of data.

Demonstration: Creating a Pivot Chart in Microsoft Office Excel

This demonstration uses Microsoft Office Excel to build a pivot chart which uses the data from the Sales and Purchase Efficiency virtual cube created in Chapter 3, "Configuring a Business Analytics Database in Microsoft Dynamics NAV." The pivot chart is used to meet the business intelligence tasks for Kevin, the Sales Manager, from the scenario in the same chapter. In particular, the pivot chart provides the graphical view of data for Kevin to find out the remaining quantity of items in stock to decide about the necessity of replenishment. Now that Kevin has found out which items are the most profitable, he designs a report to find out the remaining quantity of the sold items for each location.

NOTE: The pivot chart is based on the pivot table created in the preceding demonstration.

To build a pivot chart, use the following procedure:

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 8: Na2009 enus biip_07

Business Intelligence for IT Professionals in Microsoft Dynamics® NAV 2009

7-8

Building the Pivot Chart

1. On the Data tab, click Existing Connections to open the Existing Connections window.

2. Select the connection established between Excel and the Sales and Purchase Efficiency cube and click Open.

3. In the Import Data window, select the PivotChart and PivotTable Report leave the default value in the Existing worksheet field.

4. Click OK. 5. In the PivotTable Field List pane, select Purchased Quantity and

Remaining Quantity measures from the ItemLedgerEntry measure group.

6. Right-click the Location and the Item dimensions and select Add to Row Labels.

7. In the PivotTable Field List pane, click the AssistButton next to the Item check box under the Item dimension.

8. In the opened dialog window, select the following items: 1896-S, 1964-W, 1968-S, 1996-S, 70011 and 766BC-C.

9. Click OK. 10. Right-click the Posting Date dimension and select Add to Column

Labels. 11. Expand the More Fields node under the Posting Date dimension. 12. Select the Quarter check box. 13. In the PivotTable Field List pane, select the Description check box

under the Entry Type dimension. 14. Drag the Description label from the Row Labels pane to the Report

Filter one. 15. In the PivotTable Field List pane, click the AssistButton next to the

Description check box under the Entry Type dimension. 16. In the opened window, select the Select Multiple Items check box. 17. Expand the All Entry Type node and select Positive Adjmt. and

Purchase. 18. Click OK.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 9: Na2009 enus biip_07

Chapter 7: Data Analysis using Microsoft Office Components

7-9

The pivot chart is ready for analysis.

FIGURE 7.6 THE CHART DISPLAYING THE QUANTITY OF PURCHASED ITEMS AND THE REMAINING QUANTITY IN STOCK PER LOCATION

To change the data view, click the chart area and then on the Design tab click the Change Chart Type button. In the opened Change Chart Type window, select a different way of displaying data.

For the further analyses, use all the tools available in Microsoft Office Excel to manipulate the data or to display the data in other ways.

Creating a Pivot Chart from a Pivot Table

Use Office Excel to create pivot charts directly from a pivot table. To create a pivot chart from an already created pivot table, use the following procedure:

1. Click the pivot table area. 2. On the Options tab, click PivotChart. 3. In the Insert Chart window, select the type of a chart. 4. Click OK.

Summary Microsoft Office Excel is a powerful tool used to perform business intelligence tasks. The built-in facilities of Office Excel provide ample possibilities to retrieve data from OLAP data sources, such as Microsoft SQL Server Analysis Services, and to analyze the retrieved data in a pivot table or a pivot chart. To create pivot tables and charts from a Business Analytics database configured in Microsoft SQL Server Analysis Services, a connection must be established between Office Excel and the server using the integrated data connection wizard.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 10: Na2009 enus biip_07

Business Intelligence for IT Professionals in Microsoft Dynamics® NAV 2009

7-10

Test Your Knowledge

1. What must be done in Microsoft Office Excel to build a pivot table from a Business Analytics database configured in Microsoft SQL Server Analysis Services?

2. Which of the following methods of creating a business intelligence analysis are applicable to Microsoft Office Excel? (Select all that apply)

( ) Generate a pivot chart from a pivot table ( ) Generate a pivot table from a pivot chart ( ) Build a pivot chart simultaneously with a pivot table ( ) Build multiple charts simultaneously

3. A pivot table is already created in Microsoft Office Excel using a cube from Analysis Services as a source data. What needs to be done to select a different cube as a data source if a connection is already established to the required cube in your previous analysis?

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 11: Na2009 enus biip_07

Chapter 7: Data Analysis using Microsoft Office Components

7-11

Lab 7.1 - Building a Pivot Table and a Pivot Chart in Microsoft Office Excel

In this lab, you will practice setting up connections between Microsoft Office Excel and a Business Analytics database in Microsoft SQL Server Analysis Services, building pivot tables and pivot charts based on selected cubes from the database in the Analysis Services.

Use the Liquidity cube configured in the lab of Chapter 3, "Configuring a Business Analytics Database in Microsoft Dynamics NAV."

Scenario

Kevin, the Sales Manager, wants to analyze the liquid ratio by measuring the liquidity and ability of his company to meet its obligations on a national scale. Meaning, Kevin wants to analyze whether the receivables from the domestic debtors can cover the payables to the domestic creditors.

Challenge Yourself!

1. Establish a connection between Office Excel and the Liquidity cube of the Trade Analysis database.

2. Build a pivot table that meets the scenario tasks. 3. Build a pivot chart that meets the scenario tasks.

Need a Little Help?

1. In Microsoft Office Excel, use the data connection wizard to connect to the Liquidity cube of the Trade Analysis database.

2. Select the PivotChart and PivotTable Report option for importing data.

3. Select the Amount _LCY_C (to view the amount for sold items) and Amount _LCY_V (to view the amount for purchased items) measures in the PivotTable Field List pane.

4. Select the Posting Date and Gen_ Business Posting Group dimensions in the PivotTable Field List pane.

5. Set filters by the Customer Entry Type and the Vendor Entry Type dimensions.

Step by Step

1. On the Data tab, click From Other Sources > From Analysis Services.

2. Enter "localhost" in the Server Name field in the Data Connection Wizard window and click Next.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 12: Na2009 enus biip_07

Business Intelligence for IT Professionals in Microsoft Dynamics® NAV 2009

7-12

3. Select the Trade Analysis database and the Liquidity cube and click Finish.

4. On the Import Data tab, select the PivotChart and PivotTable Report option and click OK.

5. On the PivotTable Field List tab, select the Amount _LCY_C measure from the DetailedCust_Ledg_Entry measure group.

6. On the PivotTable Field List tab, select the Amount _LCY_V measure from the DetailedVendor_Ledg_Entry measure group.

7. Add the Gen_ Business Posting Group dimension to the Row Labels area.

8. Add the Posting Date dimension to the Column Labels area. 9. In the PivotTable Field List pane, select the Description check box

under the Customer Entry Type dimension. 10. Drag the Description label from the Row Labels pane to the Report

Filter one. 11. In the PivotTable Field List pane, click the AssistButton next to the

Description check box under the Customer Entry Type dimension. 12. In the opened window, select the Select Multiple Items check box. 13. Expand the All Entry Type node and select Initial Entries and

Application. 14. Click OK. 15. Repeat steps 9-14 for the Vendor Entry Type dimension.

FIGURE 7.7 THE PIVOT TABLE AND THE PIVOT CHART

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 13: Na2009 enus biip_07

Chapter 7: Data Analysis using Microsoft Office Components

7-13

Quick Interaction: Lessons Learned Take a moment and write down three Key Points you have learned from this chapter

1.

2.

3.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

Page 14: Na2009 enus biip_07

Business Intelligence for IT Professionals in Microsoft Dynamics® NAV 2009

7-14

Solutions Test Your Knowledge

1. What must be done in Microsoft Office Excel to build a pivot table from a Business Analytics database configured in Microsoft SQL Server Analysis Services?

MODEL ANSWER:

A connection between Microsoft Office Excel and Microsoft SQL Server Analysis Services must be established.

2. Which of the following methods of creating a business intelligence analysis are applicable to Microsoft Office Excel? (Select all that apply)

(√) Generate a pivot chart from a pivot table ( ) Generate a pivot table from a pivot chart (√) Build a pivot chart simultaneously with a pivot table ( ) Build multiple charts simultaneously

3. A pivot table is already created in Microsoft Office Excel using a cube from Analysis Services as a source data. What needs to be done to select a different cube as a data source if a connection is already established to the required cube in your previous analysis?

MODEL ANSWER:

Change the connection to the one with the required cube.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement