Home > Articles > Data > SQL Server

📄 Contents

  1. About the Series
  2. Introduction
  3. Introducing the Office PivotTable List
  4. Publishing an Excel PivotTable Report as an Office PivotTable List
  5. Next in This Series
Like this article? We recommend

Publishing an Excel PivotTable Report as an Office PivotTable List

Let's approach the creation of a PivotTable list first from the perspective of the PivotTable report. We'll create a quick report to use as a basis for this part of the lesson, both as a review for Part 1 of this series, and to make this a stand-alone lesson (an objective of this series). If you need to review the details of any of the steps involved, refer to Part 1 of this series.

Setting Up the Base PivotTable Report

The PivotTable Wizard provides a guided process for connecting Excel to the OLAP cube. Begin by taking the following steps:

  1. Open a new workbook in Excel 2000 (or beyond).

  2. To initialize the PivotTable and PivotChart Wizard, choose Data, PivotTable and PivotChart Report.

    The Step 1 of 3 wizard dialog box appears.

  3. Select External Data Source and then click Next.

    The Step 2 of 3 dialog box appears.

  4. For this tutorial, we'll use the sample OLAP cube called HR. Click the Get Data button.

    Microsoft Query starts, and presents the Choose Data Source dialog box.

  5. Click the OLAP Cubes tab, select <New Data Source>, and click OK.

    The Create New Data Source dialog box appears (see Figure 1).

    Figure 1Figure 1 The Create New Data Source dialog box.


  6. Type HR Cube in box 1. Select Microsoft OLE DB Provider for OLAP Services 8.0 in box 2.

  7. Click the Connect button.

    The Multidimensional Connection dialog box appears.

  8. Select Analysis Server as the location of the multidimensional data source. Enter the server name, user ID, and password, and then click Next.

    In Figure 2, I supplied localhost as the server name. The name localhost can be supplied if Excel and the cube share the same server machine.

    Figure 2Figure 2 The Multidimensional Connection dialog box.


    The next Multidimensional Connection dialog box appears, asking for the target database/OLAP data source.

  9. Select the FoodMart 2000 database that accompanied the Analysis Server installation, and then click Finish.

    The Create New Data Source dialog box reappears, with the new target data source indicated to the right of the Connect button.

  10. Select the HR cube in box 4 (see Figure 3), and then click OK to return to the Choose Data Source dialog box.

    Figure 3Figure 3 The completed Create New Data Source dialog box.


  11. Select HR Cube as the data source (see Figure 4), and then click OK to return to the Step 2 of 3 dialog box (see Figure 5). Notice that Data Fields Have Been Retrieved now appears to the right of the Get Data button.

    Figure 4Figure 4 The HR Cube data source is selected.

    Figure 5Figure 5 Data fields have been retrieved.

  12. Click Finish.

    An empty PivotTable report appears, with the PivotTable toolbar floating alongside it.

  13. Drag the Count button (a measure) from the PivotTable toolbar to the Data section (the portion of the PivotTable area that displays Drop Data Items Here), and drop the Count button.

    Most of the framework highlights disappear, and the PivotTable report begins to take shape, showing the Total of Count.

  14. Drag the Store dimension to the row axis of the PivotTable report, where Total appears at present for Count.

  15. Drag the Time dimension to the column axis of the PivotTable report, where the empty cell appears to the right of Count and above Total.

  16. Drag the Store Type dimension to the page axis of the PivotTable report.

  17. Drag the Department Description button from the PivotTable toolbar to the right of the Store Country column. The result set should resemble that shown in Figure 6.

    Figure 6Figure 6 The result set so far.


  18. Click the arrow button to the right of the Year column heading, uncheck 1997 (see Figure 7) to narrow the reporting scope for now, and click OK.

    Figure 7Figure 7 Deselecting 1997.


  19. Drag the Pay Type button to the right of the Year column.

  20. Select PivotTable, Table Options on the PivotTable toolbar (see Figure 8) to display the PivotTable Options dialog box.

    Figure 8Figure 8 Selecting the table options.

  21. Uncheck the Mark Totals with * box (see Figure 9 and click OK. Figure 10 shows the results.

    Figure 9Figure 9 The PivotTable Options dialog box.


    Figure 10Figure 10 The PivotTable Report with modifications.


    NOTE

    For information about the other setpoints, see the online Help and other documentation.

  22. Select File, Save As and save the worksheet as Headcount_PivotTable report.xls, simply to preserve its contents.

Publishing the Base PivotTable Report

Now we'll publish the report as an interactive web page.

  1. Choose File, Save As, and select Web Page in the Save as Type box at the bottom of the Save As dialog box.

  2. Click the Change Title button, and use the following title:

    Headcount: Location, Department and Employee Type
  3. Type Headcount in the File Name text box (see Figure 11) and click the Publish button.

    Figure 11Figure 11 Save the PivotTable report as a web page.

    The browser launches, and the Publish as Web Page dialog box appears.

  4. In the dialog box, select the following items (see Figure 12):

    • Item to Publish: PivotTable
    • Add Interactivity With: PivotTable Functionality
    • Open Published Web Page in Browser.

    Figure 12Figure 12 The completed Publish as Web Page dialog box.


  5. Click Publish. Compare your results to Figure 13.

    Figure 13Figure 13 The PivotTable list based on the Headcount PivotTable report.


Working with the PivotTable List

Having created a PivotTable list from a standard PivotTable report, we can now begin to explore the features of the PivotTable list. As we discuss some of its nuances and practice using the list, we'll compare it to the PivotTable report explored in Part 1 of this series.

  1. Click the Field List button, initializing the PivotTable field list window as shown in Figure 14. We'll return to the field list a little later.

    Figure 14Figure 14 The Field List button (in red square on the PivotTable toolbar), and the PivotTable field list window it initializes.


  2. Click the PivotTable list title bar (the blue bar displaying HR in white, at the top of the PivotTable list) to select the entire PivotTable list.

  3. Click the Property Toolbox button (to the left of the Field List button used in step 1 above).

    The PivotTable Property Toolbox appears, with Entire PivotTable in the Selection box (see Figure 15).

    Figure 15Figure 15 PivotTable Property Toolbox.

    The PivotTable Property Toolbox is context-sensitive, and is based on the section of the PivotTable list selected prior to clicking the Property Toolbox button (refer to step 3 above).

  4. Leaving the PivotTable Property Toolbox in place, click the Store Type dimension label, simply to select it. The PivotTable Property Toolbox contents change to match the new context (see Figure 16).

    Figure 16Figure 16 The PivotTable Property Toolbox changes to match the new context.

You can manipulate the font, pitch, text format, and background, along with modifying the caption and show/hide characteristics. Keep in mind, however, that a limitation of the PivotTable list (but not the standard PivotTable report) is the restriction that you can only apply different backgrounds or fonts to three separate groups of items.

Chief among other functional differences (in my opinion) between the Excel PivotTable report and Office PivotTable list is the degree of control afforded the user with regard to dimension level handling. The PivotTable report allows easy manipulation of members and dimensions, but virtually none with dimension levels. The PivotTable list provides far more control and flexibility, by allowing direct interaction with the dimension levels.

Let's examine this concept with some detailed practice steps.

  1. Close the PivotTable Property Toolbox and PivotTable field list window(s), if they're still open.

  2. The three store countries were published from the original PivotTable report in the expanded mode. Let's zoom to the summary levels, to get a feel for the process. Click the minus (-) sign to the left of each of the Canada, Mexico, and USA store countries.

  3. Expand the USA store country by selecting USA at the row axis, and then right-clicking and selecting Expand.

    Notice that no Store levels appear below Store Country, even though we have expanded Store Country for USA. We can manipulate levels quite easily in the PivotTable list, however, and will do so via the following steps.

  4. Click the Field List button, reinitializing the PivotTable field list window.

  5. Expand the Store dimension within the PivotTable field list, and highlight the Store State level beneath it.

  6. Drag the Store State level from the PivotTable field list onto the PivotTable list, dropping it when the blue line indicates a "drop zone" on the row axis, to the right of the Store Country column, as shown in Figure 17.

    Figure 17Figure 17 Adding a level into the row axis of the PivotTable list.


  7. Right-click the Store State column heading and select Expand, to expand all the store states together.

    The result should appear similar to that partially shown in Figure 18. Notice that the Expand selection expanded only the USA store states (as USA was the only expanded store country).

    Figure 18Figure 18 Expanding the new store state level—partial view.


  8. Click the drop-down arrow button at the Store Country label and clear the check boxes for Canada and Mexico, leaving USA as the only store country member. Then click OK.

Notice the immediate effect of the filter on the compactness of the PivotTable list. The selection/deselection of an item in the dimension tree acts in the PivotTable list as a filter, whereas in the PivotTable report, selection/deselection drives the appearance of items (and levels, if necessary) on the axis.

NOTE

Another difference between the Office PivotTable list and the Excel PivotTable report is that, in the PivotTable list, whether members are visible or not, levels can be added or removed from an axis. By the same token, members can be visible only from the respective levels that are specified for inclusion on the axis. In a PivotTable report, the reverse is true: A level is visible on an axis if the level's members are visible. Making the children of a member visible will add the next level, if it exists.

To return to our scenario, management wants more detail in the report, and the capability to do "one-stop shopping." Many managers even want to be able to produce a list of the employees that make up the headcount numbers. Let's set about giving management what it wants.

To make this fit easily for our practice session, let's narrow the population a bit more. (Later, we'll discuss more options for sizing the display for information consumers.)

  1. Drag the Store Country level off the PivotTable list.

    A red X symbol is displayed, indicating removal, and the Store Country column disappears. If you click the Store State label's (newly appearing) drop-down arrow button, however, you'll see that Store Country is certainly present in spirit, even though it's invisible in the display. We retain our recent "USA only" filter, as is evident in the Store State selection that remains in the PivotTable list (see Figure 19).

    Figure 19Figure 19 It's "Exit, stage left" for the Store country, but the filter remains.


  2. Drag the Store State level from the row axis immediately to the right of the Store Type dimension in the Filter area (the equivalent of the page axis in an Excel PivotTable report).

  3. Click the drop-down arrow button at the Store State label, which now appears on the page axis.

  4. Work down the Store hierarchy in the dimension tree to select the CA member (see Figure 20). Then click OK.

    Figure 20Figure 20 Filter to the CA store state.

    Notice that the All top level automatically clears itself. (The page axis is referred to as the Filter Area, in PivotTable list terminology.)

  5. If necessary, click the Field List button to reinitialize the PivotTable field list window.

  6. Drag the entire Employees dimension from the PivotTable field list onto the PivotTable list, dropping it when the blue line indicates a drop zone on the row axis, to the right of the Department Description column (see Figure 21).

    Figure 21Figure 21 Adding the employee level directly.

    Notice that this time we have not only dragged a level and its children over, but in effect we've nested an entire dimensional hierarchy as a predefined subset in one motion. It requires expanding, and it can certainly mean a crowded report, but the potential for high-leverage, user-friendly OLAP analysis here is immense.

    Let's clean up a bit, and look at more features.

  7. Expand the Department Description column by right-clicking the heading and selecting Expand from the context menu.

    Notice that the CEO shows up on every line. This is not my idea of a great hierarchical design, and is of limited value in our filtered PivotTable list. The information is repeated on every row, and consumes space inappropriately (much as corner offices themselves are sometimes misallocated). We might find this level useful, if the PivotTable list presented the data for, say, a consolidated group of companies with more than one CEO, but since Ms. Nowmer apparently reigns alone, it might be safe to contract the reporting structure by the common field to conserve space.

  8. Remove the CEO column from the PivotTable list by right-clicking the CEO label, and selecting Remove Field from the context menu.

    Ms. Nowmer steps aside, but the newly appearing drop-down arrow button at the Senior Management level label indicates that the CEO filter remains available. This illustrates again the capability we gain in the PivotTable list to work more directly with levels, a distinct enhancement over an otherwise comparable PivotTable report.

  9. Right-click the Senior Management label, and expand Senior Management by selecting Expand on the context menu.

    The result set should resemble that partially shown in Figure 22.

    Figure 22Figure 22 Expanding the Senior Management column.

    Scrolling down, we see that numerous departments appear to have further sublevels, while the departments at the top of the PivotTable list appear to go no further than the current level (as evidenced by the Total* entries that appear to their right).

  10. Click the drop-down at the Department Description label on the column axis. Work down the Store hierarchy in the dimension tree to select the Store Management member, removing all other check marks.

    The filtered view should resemble that partially shown in Figure 23.

    Figure 23Figure 23 The newly filtered PivotTable list.

  11. Drag the Department Description field to the filter area, and drop it to the right of the Store label.

  12. Click the Department Description drop-down arrow button to view the department members.

  13. Notice that the filter (via the check boxes) has been reset to All. This is the default. Check the Store Management check box to reinstate the previous filter, and click OK.

  14. Right-click the Senior Management column label, and select Property Toolbox from the context menu.

  15. Click Captions to expand the section, and change the caption to read Sr Manager (see Figure 24). This will conserve space.

    Figure 24Figure 24 Changing the caption.


  16. Expand the Format section and change the font to Arial Narrow, with a color of Indigo. (ToolTips display the color name when the mouse pointer is positioned over a color.)

  17. Close the Property Toolbox. Compare your results to Figure 25.

    Figure 25Figure 25 Format changes enacted for the dimension/level labels.

Notice that the format changes applied to the Store Management level label are replicated to all dimension and level labels. This is another difference between the Office PivotTable list and the Excel PivotTable report: In the PivotTable report, you can change the formatting of any cell, just as with a standard Excel spreadsheet. In the PivotTable list, by contrast, you can change the fonts or backgrounds for only three main groups of items (and only to the group collectively):

  • Dimension/level labels
  • Individual item labels
  • Measures

Format settings for any member of the three groups apply globally in the PivotTable list to every member of the same group. The following steps illustrate this further.

  1. Expand Level, Level 01, Level 02, and Level 03 by right-clicking and checking Expand on the respective context menu for each.

  2. Right-click Jose Bernard in the Level 01 column, and select Property Toolbox from the context menu.

  3. Expand the Format section, if necessary. Keep the Arial font, but change the font color to Dark Teal and the Background to White.

  4. Close the Property Toolbox. Compare your results to Figure 26.

    Figure 26Figure 26 Format changes enacted for item labels.


    Notice that changing formats for any member of a group (in this case, item labels) changes all members of the group simultaneously.

  5. Right-click the Level 03 label and select Sort Descending from the context menu.

  6. Right-click the Level 03 label and uncheck Subtotal in the context menu.

    Total* in the Level 03 rows disappears.

  7. Right-click the Level 04 label and select Remove Field from the context menu.

  8. To select the entire PivotTable list, click the title bar (it shows HR in white at the top of the PivotTable list).

  9. Right-click to open the context menu, and select Property Toolbox.

  10. In the PivotTable Property Toolbox, expand the Totals section.

  11. Set Total Orientation to Columns and uncheck the Total All Items check box.

  12. Right-click Level 02 and uncheck Subtotal on the context menu.

  13. Right-click Level 01 and uncheck Subtotal on the context menu.

  14. Right-click Level and uncheck Subtotal on the context menu.

  15. Close the Property Toolbox and compare your results to Figure 27.

    Figure 27Figure 27 The modified PivotTable list.

  16. Select the entire PivotTable list again, right-click to open the context menu, and select Property Toolbox.

    While we don't need to display empty rows in our report, many financial and accounting uses dictate that, even though something is zero, we might want to see it (say within a P&L statement, where a revenue line went from a million to nothing over a year). The next several steps help to show that zero-value items are still there, whether they appear or not; and that we can display them with a simple setpoint change.

  17. In the PivotTable Property Toolbox, click the Display Empty Items section to expand it.

  18. Select the Row check box, and then close the PivotTable Property Toolbox.

    The PivotTable list now appears with all empty items shown.

  19. Select the entire PivotTable list again, right-click to display the context menu, and select Property Toolbox.

    The PivotTable Property Toolbox appears.

  20. Uncheck the Row check box in the Display Empty Items section.

    Figure 28 displays the Property Toolbox setpoint.

    Figure 28Figure 28 The PivotTable list with Display Empty Items Off.

  21. Click the Field List button.

  22. Drag the Employee Salary measure from the PivotTable field list to the data area of the PivotTable list.

  23. Drop the measure immediately to the right of either Count measure column.

    Notice that the Employee Salary measure appears in both Years' columns, to show a breakout over time as specified. The Office PivotTable list exposes a property for the control of the measures' placement (or orientation, as it's called in the PivotTable Property Toolbox). This is accomplished differently in an Excel PivotTable report, where multiple measures result in the creation of new data dimensions. In addition, measures are referred to as totals in the Office PivotTable list, representing another terminology difference in the two components.

  24. Right-click the Employee Salary label.

    The associated Property Toolbox appears, with a slightly different Format section than those we've seen up to this point.

  25. Select Currency for Number Format (see Figure 29).

    Figure 29Figure 29 Property Toolbox for measures.


  26. Change the Caption to Salary(000), to make sure that the salaries make sense to the potentially unwitting information consumer. (The caption should appear as shown in Figure 29.)

  27. Close the Property Toolbox.

  28. Select the entire PivotTable list again, right-click to open the context menu, select Property Toolbox, and expand the Totals section, if necessary.

  29. Select the Total All Items check box.

  30. Close the Property Toolbox. Figure 30 shows the final view of the PivotTable list.

    Figure 30Figure 30 Final view of the first Office PivotTable list.

While differing in many ways from the Excel PivotTable report, the Office PivotTable list offers more flexibility in certain areas, including the ability to more directly control totals.

NOTE

After closing the browser used to display and manipulate the PivotTable list, notice that all modifications are lost, with the PivotTable list defaulting to the originally published display. The next section addresses the design of a PivotTable list using Microsoft FrontPage 2000, where you can save your changes at the design level.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020