lab environment - web viewlab 02a – creating and publishing an excel workbook to...

52
Lab 02A – Creating and Publishing an Excel Workbook to SharePoint Hands-on Lab Released:

Upload: truongkhanh

Post on 09-Mar-2018

219 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePointHands-on Lab

Released:

Page 2: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Terms of UseThis document is provided “as-is”. Information and views expressed in this document, including URL and other Internet Web site references, may change without notice. You bear the risk of using it.

Some examples depicted herein are provided for illustration only and are fictitious. No real association or connection is intended or should be inferred.

This document does not provide you with any legal rights to any intellectual property in any Microsoft product. You may copy and use this document for your internal, reference purposes.

© 2011 Microsoft Corporation. All rights reserved.

This document reflects current views and assumptions as of the date of development and is subject to change.  Actual and future results and trends may differ materially from any forward-looking statements.  Microsoft assumes no responsibility for errors or omissions in the materials. 

THIS DOCUMENT IS FOR INFORMATIONAL AND TRAINING PURPOSES ONLY AND IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.

2 © 2023 Microsoft Corporation. All rights reserved.

Page 3: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

About the AuthorAuthor: Peter MyersBio: Peter Myers has been working in Information Technology since

1997 and has accumulated solid experience working in OLTP database design and development, DBA support and Business Intelligence with SQL Server.

Specializing in Microsoft Business Intelligence, Peter provides mentoring, technical training and course content authoring for SQL Server and Office. Specifically he works with Integration Services, Analysis Services (cubes and data mining), Reporting Services, Excel, PowerPivot and SharePoint BI.

He has a broad business background supported by a bachelor degree in applied economics, and he extends this with current MCITP and MCT certifications. He has been an MVP since 2006.

Peter is an established consultant, trainer and presenter with SolidQ and enjoys sharing his enthusiasm for Microsoft technologies by presenting at user group meetings, technical events and conferences.

Email: [email protected]

Page 4: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Table of Contents

Lab Environment................................................................................................................................................................ 1

Lab Overview........................................................................................................................................................................2

Exercise 1: Creating the ODC File................................................................................................................................4

Exercise 2: Creating the PivotTable Report..........................................................................................................10

Exercise 3: Creating the Free-Form Report..........................................................................................................19

Exercise 4: Publishing the Excel Workbook to SharePoint...........................................................................30

Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard............................34

Appendix.............................................................................................................................................................................. 42

4 © 2023 Microsoft Corporation. All rights reserved.

Page 5: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab EnvironmentDuring this lab you will work in a simulated environment with the following computer and prerequisite databases.

Computers and virtual machines used in this lab

Icon Computer Name Description

DEMO2010A

This computer is configured as a stand-alone server running Windows Server 2008 R2 with SQL Server 2008 R2 and SharePoint 2010 Enterprise. The Microsoft Office suite, including Visio, and the SQL Server PowerPivot Add-ins for Excel and SharePoint have also been installed.

Logon Credentials

The lab environment might require you to logon to the Hands-on-Lab Environment using the following credentials, unless specified differently throughout the lab manual.

Username PasswordCONTOSO\Administrator pass@word1

AdventureWorks Databases

The AdventureWorks sample databases are a set of databases that are available for Microsoft SQL Server 2005, 2008 and 2008 R2. This lab is based on the 2008 R2 samples, and specifically uses the AdventureWorksDW2008R2 relational database.

The sample databases can be downloaded from http://msftdbprodsamples.codeplex.com.

Sales Analysis Database

The Sales Analysis database is an Analysis Services database includes a single cube named Reseller Sales and has been created specifically for this lab. The source data for this cube and its dimensions is based on the AdventureWorksDW2008R2 sample relational database.

1 Microsoft Confidential - For Internal Use Only

Page 6: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Appendix

Lab OverviewAbstract

In this lab, you will use the Excel client and Excel Services to create a sophisticated dashboard in SharePoint using data from SQL Server Analysis Services cube.

You will commence by creating an Office Data Connection (ODC) file that will support connections to the SQL Server Analysis Services Sales Analysis database and Reseller Sales cube. In line with best practice, this ODC file will be published to a SharePoint Data Connections library where it can be approved, secured, maintained and referenced by many reports.

You will then create two reports in the Excel client that will reference this ODC file. The first report will be a PivotTable report that will support end user interactivity by allowing drilldown, sort and filter. Additionally, the PivotTable report will be styled and include conditional formatting.

The second report will be created by defining a second PivotTable. However, once the PivotTable is defined, it will be converted to formulas (CUBE functions) which will allow you a greater degree of flexibility to customize and style the report. It will be enhanced with a slicer, sparklines, custom formulas and a bar chart.

Both reports will be created in the one Excel workbook, and will be driven by a single parameter to support the passing in of the fiscal year value(s) to report on. The publication options will only support Excel Services rendering the two reports.

Once the Excel workbook is published to the Excel Reports SharePoint library, it will then be used to create a dashboard. The dashboard will consist of a SQL Server Analysis Services Filter Web Part to prompt the user for fiscal year value(s), and two Excel Web Access Web Parts to embed both of the reports authored in this lab. Connections will be established to support the passing of the filter value(s) to each report.

Remarkably, the entire dashboard and its components will be created without the need to produce any programming code or database queries.

Learning Objectives

After completing the exercises in this lab, you will be able to:

Create an Office Data Connection (ODC) file

Create a PivotTable Report

Create a free-form report based on the CUBE functions

2 © 2023 Microsoft Corporation. All rights reserved.

Page 7: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Configure Publish Options to determine the content that Excel Services can render, and the value(s) that can be passed in

Create a dashboard in a SharePoint library using a Web Part Page

Configure the SQL Server Analysis Services Filter Web Part

Configure the Excel Web Access Web Part

Define connections to allow filter values to pass to the Excel Web Access Web Part

The completed dashboard page will look like the following.

Estimated time to complete this lab: 60 minutes

3 Microsoft Confidential - For Internal Use Only

Page 8: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Appendix

Exercise 1: Creating the ODC FileScenarioIn this exercise you will create an ODC file that will allow connecting to the Reseller Sales cube in the Sales Analysis Analysis Services database. You will save the file in a SharePoint Data Connection Library and then approve it so that it will become visible to all users.

The ODC file will be referenced in several exercises in this lab, specifically when creating a PivotTable report in Excel, and a dashboard filter in the SharePoint Web Part Page.

All exercises in this lab are completed using the DEMO2010A computer.

Task Detailed Steps

Complete these steps by connecting to the computer DEMO2010A.

Create the Reseller Sales ODC File

1. To open Excel, click the Start button, and then select All Programs | Microsoft Office | Microsoft Excel 2010.

2. On the Data ribbon tab, inside the Get External Data group, click From Other Sources, and then select From Analysis Services.

3. In the Data Connection Wizard, in the Connect to Database Server step, in the Server Name box, enter DEMO2010A, and then click Next.

4 © 2023 Microsoft Corporation. All rights reserved.

Page 9: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Task Detailed Steps

4. In the Select Database and Table step, in the database dropdown list, ensure that the Sales Analysis database is selected, and then click Next.

5. In the Save Data Connection File and Finish step, click Browse.6. If prompted for credentials, in the Windows Security window, enter

the following values, and then click OK.

Property Value

User Name Administrator

Password pass@word1

7. In the File Save window, in the File Name box, enter http://intranet.contoso.com/sites/AdventureWorksBI_Lab02A, and then press Enter.

Note: The site URL required in this step may be copied from the C:\

5 Microsoft Confidential - For Internal Use Only

Page 10: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Appendix

Task Detailed StepsCourseFiles\SharePointBI\Labs\Lab02A\Assets\Lab02A_Snippets.txt file.

8. To navigate to the Data Connections library, double-click Data Connections.

9. In the File Name box, modify the name of the file to Reseller Sales.odc, and then click Save.

10. In the Data Connection Wizard, enter the following values, and then click Finish.

Property Value

Description (Remove the default text)

Friendly Name Reseller Sales

Note: The Friendly Name becomes the name of the Excel workbook connection.

11. In the Web File Properties window, in the Content Type dropdown list, select Office Data Connection File, and then click OK.

6 © 2023 Microsoft Corporation. All rights reserved.

Page 11: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Task Detailed Steps

12. When the file has been saved, in the Import Data window, select the Only Create Connection option, and then click OK.

Note: Reports based on this connection will be created in the next two exercises of this lab.

Approve the Reseller Sales ODC File

1. To open Internet Explorer, click the Start button, and then select All Programs | Internet Explorer.

2. To open the AdventureWorksBI site home page for this lab, on the toolbar, click the Favorites button, and then select the AdventureWorksBI Lab02A favorite.

7 Microsoft Confidential - For Internal Use Only

Page 12: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Appendix

Task Detailed Steps

3. In the Quick Launch menu (located on the left side), select Data Connections.

4. In the Data Connections library, notice that the Reseller Sales ODC file has an approval status of Pending.

Note: This library has been configured to require content approval.

5. Hover over the Reseller Sales ODC file, click the dropdown arrow, and then select Approve/Reject.

6. In the Approve/Reject window, select Approved, and then click OK.

8 © 2023 Microsoft Corporation. All rights reserved.

Page 13: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Task Detailed Steps

9 Microsoft Confidential - For Internal Use Only

Page 14: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Appendix

Exercise 2: Creating the PivotTable ReportScenarioIn this exercise you will create and format a PivotTable report based on the Reseller Sales workbook connection. The US Product Sales report will present reseller sales made by the salespeople in the United States, and will allow users to explore the sales at the different levels of the Products hierarchy (category, subcategory and product), and at quarter and month levels for a particular fiscal year. In the last exercise of this lab, you will configure a Web Part connection to pass fiscal year value(s) into this report.

The completed report will look like the following.

Task Detailed StepsCreate a PivotTable Report

1. Switch to Excel.2. On the Insert ribbon tab, click the PivotTable dropdown, and then

select PivotTable.

3. In the Create PivotTable window, select the Use an External Data Source option, and then click Choose Connection.

4. In the Existing Connections window, notice that the Reseller Sales

10 © 2023 Microsoft Corporation. All rights reserved.

Page 15: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Task Detailed Stepsconnection is listed and selected, and then click Open.

Note: The connection is listed because it was created in the previous exercise. It is a common requirement to click the Browse button to navigate to, and select, the ODC file in the SharePoint library.

5. In the Create PivotTable window, click OK.6. On the PivotTable Tools Options ribbon tab, inside the PivotTable

group, in the PivotTable Name box, modify the text to USProductSales.

Note: Workbook item names must be unique, and they cannot contain embedded spaces.

7. In the PivotTable Field List (located on the right), select the Sales Amount measure, and notice that it is automatically added to the Values drop zone, and that the PivotTable is updated.

8. In the PivotTable Field List, scroll down to locate the Date dimension, expand the More Fields folder, and then drag the Fiscal Year hierarchy into the Report Filter drop zone.

11 Microsoft Confidential - For Internal Use Only

Page 16: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Appendix

Task Detailed Steps

9. In the PivotTable Field List, drag the following fields into the respective drop zones.

Field Drop Zone

Salesperson | Salespeople Report Filter (below Fiscal Year)

Date | Fiscal Column Labels

Product | Products Row Labels

10. The PivotTable drop zones should look like the following.

12 © 2023 Microsoft Corporation. All rights reserved.

Page 17: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Task Detailed Steps

Filter the PivotTable Report

1. To filter the report by fiscal year, in the Fiscal Year report filter (cell B1), click the dropdown arrow, expand the All member, select FY2010, and then click OK.

2. To filter the report by United States, in the Salespeople report filter (cell B2), click the dropdown arrow, expand the All member, expand the North America member, select the United States member, and then click OK.

3. In the PivotTable, to hide the year and only show quarters and months on the columns, expand the FY2010 member (cell B5), right-click the FY2010 Q1 member, and then select Show/Hide Fields | Year.

4. The PivotTable report should look like the following.

13 Microsoft Confidential - For Internal Use Only

Page 18: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Appendix

Task Detailed Steps

Format the PivotTable Report

1. To format the PivotTable report, on the PivotTable Tools Design ribbon tab, inside the PivotTable Styles group, click the dropdown arrow to open the list, and then select Pivot Style Light 15.

2. To apply conditional formatting to the Category values, right-click the Bikes member (cell A6), and then select Expand/Collapse | Expand to “Product”.

3. In the FY2010 Q1 column, select the Bikes value (cell B6).4. On the Home ribbon tab, inside the Styles group, click Conditional

Formatting, select Data Bars, and then select the first (blue) Gradient Fill style.

Note: Data bars are an effective way of visualizing relative distribution of related values.

14 © 2023 Microsoft Corporation. All rights reserved.

Page 19: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Task Detailed Steps

5. To apply the conditional format to similar cells within the PivotTable, to the right of cell B6, click the smart tag, and then select the last option All Cells Showing “Sales Amount” Values for “Category” and “Quarter”.

6. To apply conditional formatting to the Subcategory values, in the FY2010 Q1 column, select the Mountain Bikes value (cell B7).

7. On the Home ribbon tab, click Conditional Formatting again, select Data Bars, and then select the second (green) Gradient Fill style.

8. Again, to apply the conditional format to similar cells within the PivotTable, to the right of cell B7, click the smart tag, and then select the last option All Cells Showing “Sales Amount” Values for “Subcategory” and “Quarter”.

9. Repeat the last two steps to apply conditional formatting to the Product values by applying the fourth (orange) Gradient Fill style to all product values.

10. To highlight alternate rows, in the PivotTable Tools Design ribbon tab, inside the PivotTable Style Options group, select Banded Rows.

11. The PivotTable report should look like the following.

15 Microsoft Confidential - For Internal Use Only

Page 20: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Appendix

Task Detailed Steps

12. To collapse the Products hierarchy, right-click the Bikes member (cell A6), and then select Expand/Collapse | Collapse Entire Field.

Prepare the PivotTable Report for Publication

1. To allow Excel Services to pass value(s) into the Fiscal Year report filter, it must be defined as a single-cell named range. Select cell B1, and then on the Formulas ribbon tab, inside the Defined Names group, click Define Name.

2. In the New Name window, in the Name box, replace the text with FiscalYear, and then click OK.

3. To hide the PivotTable report filters, select rows 1 to 3.

16 © 2023 Microsoft Corporation. All rights reserved.

Page 21: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Task Detailed Steps4. Right-click anywhere within the selected rows, and then select Hide.

5. The completed PivotTable report should look like the following.

17 Microsoft Confidential - For Internal Use Only

Page 22: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Appendix

Exercise 3: Creating the Free-Form ReportScenarioIn this exercise you will create a professionally styled free-form report using the CUBE functions. The easiest and fastest way to create these types of reports is usually to create a PivotTable report first, and then convert the PivotTable to formulas. Once converted, the report author has the flexibility to customize the report layout beyond the capabilities and restrictions of the PivotTable. This is precisely the practice that will be undertaken in this exercise.

The report will be enhanced with a slicer, sparklines, custom formula to calculate commission payments, and a bar chart. Slicers are an ideal, and visually appealing, method to prompt users to filter report data. Sparklines are an ideal way to convey trend information by representing time series data, in this case, the series of regional quarterly sales.

The completed report will look like the following.

Task Detailed StepsCreate a New PivotTable Report

1. In Excel, select worksheet Sheet2.

2. Select cell B1.

Note: It is important to follow the exact details of this exercise to produce the planned layout and style for this report.

3. On the Insert ribbon tab, click the PivotTable dropdown, and then select PivotTable.

4. In the Create PivotTable window, select the Use an External Data Source option, then click Choose Connection.

5. In the Existing Connections window, notice that the Reseller Sales connection is selected, and then click Open.

6. In the Create PivotTable window, click OK.7. In the PivotTable Field List, drag the following fields into the drop

zones.

Field Drop Zone

Sales Amount Values

Date | Fiscal Quarter of Year(Expand More Fields)

Column Labels

Salesperson | Salespeople Row Labels

8. The PivotTable drop zones should look like the following.

18 © 2023 Microsoft Corporation. All rights reserved.

Page 23: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Task Detailed Steps

9. To produce a list of United States’ regions, in the PivotTable, right-click the North America member (cell B5), and then select Expand/Collapse | Expand to “Region”.

10. Select all regions beneath the United States member (range B9:B13), right-click the selected range, and then select Filter | Keep Only Selected Items.

11. To remove the North America member, right-click the North America member (cell B3), and then select Show/Hide Fields | Group.

12. Select the United States member (cell B3), and repeat the last step to hide the Country level.

13. The filtered PivotTable should look like the following.

Insert a Slicer 1. Ensure any cell within the PivotTable is selected.2. On the Insert ribbon tab, inside the Filter group, click Slicer.3. In the Insert Slicers window, select the Product | Products | Category

hierarchy level, and then click OK.

19 Microsoft Confidential - For Internal Use Only

Page 24: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Appendix

Task Detailed Steps

4. Ensure the slicer is selected, then on the Slicer Tools Options ribbon tab, inside the Size group, enter the following property values.

Property Value

Height 1.9

Width 1.4

5. To style the slicer, on the Slicer Tools Options ribbon, inside the Slicer Styles group select the (gray) Slicer Style Other 1 style.

6. To widen column A to accommodate the slicer, right-click the column A guide, and then select Column Width.

7. In the Column Width window, in the Column Width box, replace the value with 20, and then click OK.

8. Right-click the Category slicer, and then select Size and Properties.9. In the Size and Properties window, select the Position and Layout

page, and then update the following property values.

Property Value

Horizontal 0

Vertical 0

Disable Resizing and Moving (Selected)

10. To filter the PivotTable based on the Bikes category, select the Bikes member. Click each of the other category members and notice the

20 © 2023 Microsoft Corporation. All rights reserved.

Page 25: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Task Detailed StepsPivotTable data automatically refresh.

11. To remove the filter, in the Category slicer, located in the top right corner, click Clear Filter.

Convert the PivotTable Report to Formulas, and Customize the Report CUBE Functions

1. Ensure any cell within the PivotTable is selected.2. To convert the PivotTable report to formulas, on the PivotTable Tools

Options ribbon tab, inside the Tools group, click OLAP Tools, and then select Convert to Formulas.

Note: The CUBE functions are only supported for SQL Server Analysis Services data connections.

3. Select cell B1 and notice the formula that uses the CUBEMEMBER function to retrieve the Sales Amount measure from the Reseller Sales workbook connection.

4. Select cell B3 and notice the formula that uses the CUBEMEMBER function to retrieve the Region member with a key value of 1 from the Reseller Sales workbook connection.

5. Select cell B8 and notice the formula that uses the CUBESET function to retrieve the total of the five Region members from the Reseller Sales workbook connection. Also notice the final value Grand Total passed into the function that allows setting the cell caption.

6. Select cell C3 and position the cursor in the formula bar.7. Notice the formula that uses the CUBEVALUE function to retrieve the

value at the intersection of the other cell references, and the slicer, from the Reseller Sales workbook connection.

21 Microsoft Confidential - For Internal Use Only

Page 26: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Appendix

Task Detailed Steps8. To introduce a date filter into the CUBEVALUE function based on the

value selected in the first PivotTable report, modify function’s filter list by appending the FiscalYear named region to the end (and be sure to include the preceding comma).

Note: FiscalYear is the named range created in the previous exercise.

9. To format the values, right-click cell C3, and then select Format Cells.10. In the Format Cells window, in the Category list, select Number.11. Update the following property values, and then click OK.

Property Value

Decimal Places 0

Use 1000 Separator (Selected)

12. To copy the new formula for format to the other value cells on the same row, ensure that cell C3 is selected, and then drag the bottom right corner of the cell border to copy the formula across to cell G3.

13. To copy the selected formulas to the remaining value cells on the rows beneath, drag the bottom right corner of the bordered range down to

22 © 2023 Microsoft Corporation. All rights reserved.

Page 27: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Task Detailed Stepsrow 8.

Customize and Format the Free-Form Report

1. To insert a custom calculation, in cell B10, enter the text Commission.2. In cell C10, enter the following formula.

=IFERROR(C8 * 0.15, NULL)

Note: The IFERROR() function will attempt to evaluate the formula passed in. If an error is raised, the second value, in this case NULL, is returned. In this report you need to consider that the user may filter on an incomplete fiscal year, and this will result in attempting to calculate commission on “empty” data.

3. To copy the new formula to the other value cells on the same row, ensure that cell C10 is selected, and then drag the bottom right corner of the cell border to copy the formula across to cell G10.

4. Remove the text Column Labels in cell C1.5. Replace the text in cell B2 with Region.6. Select the column range C:G, right-click anywhere within the range, and

then select Column Width.7. In the Column Width window, in the Column Width box, replace the

value with 10, and then click OK.8. Select the range C2:G2, and then on the Home ribbon tab, inside the

Alignment group, select Align Text Right.

23 Microsoft Confidential - For Internal Use Only

Page 28: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Appendix

Task Detailed Steps

9. To format the table header, select the range B2: G2, and then right-click anywhere within the range, and then select Format Cells.

10. In the Format Cells window, select the Font tab, and then update the following property values.

Property Value

Font Style Bold

Color White

11. Select the Fill tab, and in the Background Color palette, select a dark gray color, and then click OK.

12. Select cell G2, and update the CUBEMEMBER function to modify the caption value from Grand Total to Total.

13. Select cell B8, and repeat the last step to update the CUBESET’s caption value also from Grand Total to Total.

14. To format the table footer, select the range B8: G8, and then on the Home ribbon tab, inside the Font group, in the Border dropdown list, select Top and Double Bottom Border.

15. Finally, to format the commission calculations, select the range B10:

24 © 2023 Microsoft Corporation. All rights reserved.

Page 29: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Task Detailed StepsG10, and then on the Home ribbon tab, inside the Font group, select Italic.

16. The formatted report should look like the following.

Insert a Sparkline

1. To insert a new column to accommodate a sparkline, right-click the column G guide, and then select Insert.

2. To add a column header, in cell G2, enter Trend.3. To add a sparkline, select cell G3, and then on the Insert ribbon tab,

inside the Sparklines group, select Line.4. In the Create Sparklines window, to the right of the Data Range box,

click the range selector button.

5. Select the range C3:F3, and then press Enter.6. In the Create Sparklines window, click OK.7. To copy the sparkline to the other table rows, ensure that cell G3 is

selected, and then drag the bottom right corner of the cell border down to row 8.

8. To preserve the cell formats, click the smart tag that appears below cell G8, and then select Fill Without Formatting.

25 Microsoft Confidential - For Internal Use Only

Page 30: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Appendix

Task Detailed Steps

9. The completed table should look like the following.

Insert a Chart 1. To select the chart data, select the range B2:F7.2. On the Insert ribbon tab, inside the Charts group, click Column, and

then select the first 2-D Column chart type.

3. Ensure the chart is selected, and then on the Chart Tools Format ribbon tab, inside the Arrange group, click Align, and then select Snap to Grid.

26 © 2023 Microsoft Corporation. All rights reserved.

Page 31: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Task Detailed Steps

4. Drag the chart so that its top left corner sits in cell B12.5. Ensure the chart is selected, and then on the Chart Tools Format

ribbon tab, inside the Size group, enter the following property values.

Property Value

Height 2

Width 5.65

6. To explore the table to chart data synchronization, in the Category slicer, select the Bikes member, and notice that the chart updates to reflect the data in the table.

7. To remove the filter, in the Category slicer, located in the top right corner, click Clear Filter.

8. The completed chart should look like the following.

Prepare the Free- 1. To create a named range, select cell H21 and drag to select cell A1.2. On the Formulas ribbon tab, inside the Defined Names group, click

27 Microsoft Confidential - For Internal Use Only

Page 32: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Appendix

Task Detailed Steps

Form Report for Publication

Define Name.3. In the New Name window, in the Name box, enter

USRegionQuarterSales, and then click OK.

4. To remove the gridlines, on the View ribbon tab, inside the Show group, unselect Gridlines.

28 © 2023 Microsoft Corporation. All rights reserved.

Page 33: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Exercise 4: Publishing the Excel Workbook to SharePointScenarioIn this exercise you will configure the Excel workbook Publish Options to determine what content Excel Services can render. In this case you will select that only the PivotTable report and a named range encompassing the free-form report can be rendered.

Additionally, you will add a parameter to support passing values into the FiscalYear named range. In the final exercise of this lab, this will support the dashboard scenario of passing a filter Web Parts’ selected value(s).

Task Detailed StepsPublish the Excel Workbook to SharePoint

1. In Excel, select the backstage view.

2. Select Save & Send, select Save to SharePoint, and then click Publish Options.

3. In the Publish Options window, in the dropdown list, select Items in the Workbook.

4. Select the USProductSales and USRegionQuarterSales items.

29 Microsoft Confidential - For Internal Use Only

Page 34: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Appendix

Task Detailed Steps

5. Select the Parameters tab, and then to add a parameter, click Add.6. In the Add Parameters window, select FiscalYear, and then click OK.

Note: Slicers can also be added as parameters. This is not a requirement in this lab.

7. In the Publish Options window, click OK.8. To publish the workbook, in the backstage view, click Save As.9. In the Save As window, in the File Name box, enter

http://intranet.contoso.com/sites/AdventureWorksBI_Lab02A, and then press Enter.

Note: The site URL required in this step may be copied from the C:\CourseFiles\SharePointBI\Labs\Lab02A\Assets\Lab02A_Snippets.txt file.

10. To navigate to the Excel Reports library, scroll down to, and double-click Excel Reports.

11. In the File Name box, modify the name of the file to US Sales Reports.12. Ensure the Open with Excel in the Browser checkbox is selected, and

30 © 2023 Microsoft Corporation. All rights reserved.

Page 35: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Task Detailed Stepsthen click Save.

Browse the Reports in the Browser

1. When the Internet Explorer window opens, recall from your development of the workbook in this lab that the date is presently filtered on fiscal year 2010.

2. To explore the interactive functionality of the USProductSales PivotTable report, expand the Bikes member, notice the conditional formatting.

3. On the Row Labels, click the dropdown arrow.

4. Select Product | Value Filters | Greater Than.5. In the Custom Filter window, in the Is Greater Than box, enter

500,000 (do not enter the comma), and then click OK.

6. Notice that any products with a grand total of less than 500,000 have been removed from the PivotTable report.

7. To switch to the second report, in the View dropdown list, select the USRegionalQuarterSales report.

8. In the Category slicer, select the Bikes member, and notice that the

31 Microsoft Confidential - For Internal Use Only

Page 36: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Appendix

Task Detailed Stepstable, commission calculations and associated chart update.

9. Leave the Internet Explorer window open.

32 © 2023 Microsoft Corporation. All rights reserved.

Page 37: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Exercise 5: Embedding and Filtering Excel Reports into a SharePoint DashboardScenarioIn this exercise you will create a dashboard page in SharePoint based on a Web Part Page.

First you will add a Content Editor Web Part to the page to provide a visually appealing title. Next, you will introduce a SQL Server Analysis Services Filter Web Part, and configure it to use the ODC file created in Exercise   1 to prompt the user to select values from the Date dimension’s Fiscal Year hierarchy.

Then you will add two Excel Web Access Web Parts and configure each to display one of the two reports authored in this lab. You will then create Web Part connections to allow the user-selected filter value(s) to be passed to both reports.

Finally, you will browse and interact with the dashboard page.

The completed dashboard page will look like the following.

33 Microsoft Confidential - For Internal Use Only

Page 38: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Appendix

Task Detailed StepsCreate a Web Part Page

1. In Internet Explorer window, to navigate to the site home page, on the page breadcrumb trail, click AdventureWorksBI Lab02A.

2. In the Quick Launch menu, select Dashboards.3. To add a dashboard page, on the Library Tools Documents ribbon tab,

click the New Document dropdown, and then select Web Part Page.

4. In the New Web Part Page page, enter the following property values, and then click Create.

Property Value

Name US Sales Dashboard

Layout Template Header, Left Column, Body

Document Library Dashboards

Add and Configure a Content Editor Web Part

1. Inside the Header zone (located at the very top), click Add a Web Part.2. In the Categories list, select Media and Content, then in the Web

Parts list, select Content Editor, and then click Add.

34 © 2023 Microsoft Corporation. All rights reserved.

Page 39: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Task Detailed Steps

3. Inside the Content Editor Web Part, click Click Here to Add New Content.

4. On the Editing Tools Format Text ribbon tab, inside the Font group, in the font size dropdown list, select 24.

5. Enter US Sales Dashboard.6. To update the Web Part title, click the dropdown arrow in the top right

corner of the Content Editor Web Part, and then select Edit Web Part.

7. In the tool pane (on the right), expand the Appearance category, in the Title box, replace the text with Adventure Works Dashboard, and then click OK (located at the bottom of the tool pane).

8. The dashboard title should look like the following.

Add and Configure a Filter Web Part

1. Inside the Left Column zone, click Add a Web Part.2. In the Categories list, select Filters, then in the Web Parts list, select

SQL Server Analysis Services Filter, and then click Add.

35 Microsoft Confidential - For Internal Use Only

Page 40: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Appendix

Task Detailed Steps

3. Inside the SQL Server Analysis Services Filter Web Part, click Open the Tool Pane.

4. In the tool pane, in the Filter Name box, replace the text with Fiscal Year.

5. To use the ODC file created in Exercise 1, to the right of the Office Data Connection File box, click the icon.

6. In the Select an Asset window, double-click the Data Connections library, select the Reseller Sales ODC file, and then click OK.

7. Complete the Web Part configuration based on the following property values, and then click OK.

Category Property Value

Filter Dimension Date

Hierarchy Fiscal Year

Default Value(Expand Advanced Filter Options)

[Date].[Fiscal Year].&[2010]

Appearance Title Fiscal Year

Width Yes: 120 Pixels

Note: The Default Value property cannot use MDX expressions and must use the member key (i.e. member names cannot be used).

36 © 2023 Microsoft Corporation. All rights reserved.

Page 41: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Task Detailed StepsUnfortunately, to update the default for future periods, you would need to manually edit the property, for example, from fiscal year 2010 to 2011.

Add and Configure an Excel Web Access Web Part

1. Inside the Body zone, click Add a Web Part.2. In the Categories list, select Business Data, then in the Web Parts list,

select Excel Web Access, and then click Add.

3. Inside the Excel Web Access Web Part, click Click Here to Open the Tool Pane.

4. In the tool pane, to reference the Excel workbook published in the previous exercise, to the right of the Workbook box, click the ellipsis.

Note: The ellipsis beside the Named Item property does not retrieve the available items in the selected workbook. Instead, it presents a Text Editor window to assist entering the text value.

5. In the Select an Asset window, double-click the Excel Reports library, select the US Sales Reports document, and then click OK.

6. Complete the Web Part configuration based on the following property values, and then click OK.

Category Property Value

Workbook Named Item USProductSales

37 Microsoft Confidential - For Internal Use Only

Page 42: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Appendix

Task Detailed Steps

Display

Toolbar and Title Bar

Autogenerate Web Part Title

Unselect

Autogenerate Web Part Title URL

Unselect

Type of Toolbar Summary

Named Item Drop-Down List

Unselect

Appearance Title US Product Sales

7. To receive the Fiscal Year filter value, click the dropdown arrow in the top right corner of the US Product Sales Web Part, and then select Connections | Get Filter Values From | Fiscal Year.

Note: As is the case here, you can configure the connection from the consumer Web Part, or as you will do later in this exercise, you can configure the connection from the provider Web Part.

8. In the Configure Connection window, notice the single item in the Filtered Parameter dropdown list, and then click Finish.

Note: The single item is the FiscalYear workbook parameter you added in Exercise 4.

Add and Configure a Second Excel Web Access Web Part

1. Follow the steps in the previous task to add a second Excel Web Access Web Part to the Body zone that references the US Sales Reports workbook.

2. Complete the Web Part configuration based on the following property values, and then click OK.

Section Property Value

Workbook Display

Named Item USRegionQuarterSales

Toolbar and Title Bar

Autogenerate Web Part Title

Unselect

Autogenerate Web Unselect

38 © 2023 Microsoft Corporation. All rights reserved.

Page 43: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Task Detailed Steps

Part Title URL

Type of Toolbar None

Appearance Title US Region Quarter Sales

Height 440 Pixels

3. As alternate way to configure the connection between the Web Parts, click the dropdown arrow in the top right corner of the Fiscal Year Web Part, and then select Connections | Send Filter Values To | US Region Quarter Sales.

4. In the Choose Connection window, in the Connection Type dropdown list, select Get Filter Values From, and then click Configure.

5. Again, notice the single item in the Filtered Parameter dropdown list, and then click Finish.

6. To stop editing the page, on the Page ribbon tab, click Stop Editing.

Browse the Dashboard

1. Notice the default file value of FY2010.2. To modify the filter value, click the button to the right of the filter box.

3. In the Select Filter Value(s) window, unselect FY2010, select FY2011, and then click OK.

Note: It is not possible to disable the multi-select capability.

4. Notice that both Excel reports are updated.5. In the Category slicer, select the Clothing member.6. Notice that both the table and chart update to reflect quarterly sales for

39 Microsoft Confidential - For Internal Use Only

Page 44: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Appendix

Task Detailed Stepsclothing only.

7. While pressing the Shift key, in the Category slicer, select the Accessories member.

8. Notice that the report displays the sum of both category’s sales.

Finish Up 1. Close the Internet Explorer window.2. In Excel, in the backstage view, select Exit.

40 © 2023 Microsoft Corporation. All rights reserved.

Page 45: Lab Environment -    Web viewLab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Lab 02A – Creating and Publishing an Excel Workbook to SharePoint- Exercise 5: Embedding and Filtering Excel Reports into a SharePoint Dashboard

Appendix

Labcode Manual Version Last UpdateSharePointBI/Lab02A Version 1 6/29/2011 11:09:00 AM

Lab Notes

Description Details

Virtual Machine Requirements

Virtual Machine Name Details

41 Microsoft Confidential - For Internal Use Only