Home > Articles > Home & Office Computing > Microsoft Applications

This chapter is from the book

Changing the Calculation in a Value Field

The Value Field Settings dialog offers 11 options on the Summarize Values As tab and 15 main options on the Show Values As tab. Whereas the options under the first tab are the basic Sum, Average, Count, Max, and Min options that are ubiquitous throughout Excel, the 15 options under Show Values As offer interesting options such as % of Total, Running Total, and Ranks.

For Excel 2010 only, these options appeared as two drop-down menus in the ribbon. They were removed from the 2013 ribbon, but they still exist in the right-click menu. Because many of the calculations require one or two additional settings, you end up back in an extra dialog anyway. If you get in the habit of using the Value Field Settings dialog, you will have access to all the settings in one dialog.

Six of the Show Values As calculations were introduced in Excel 2010. These include % of Parent Item, Rank, and % Running Total In.

The following examples show how to use the various calculation options. To contrast the various settings, you can build a pivot table where you drag the Revenue field to the VALUES area nine separate times. Each shows up as a new column in the pivot table. Over the course of the rest of the chapter, you see the settings required for the calculations in each column.

To change the calculation for a field, select one value cell for the field and click the Field Settings button on the Analyze tab of the ribbon. The Value Field Settings dialog is similar to the Field Settings dialog, but it has two tabs. The first tab, Summarize Values By, contains Sum, Count, Average, Max, Min, Product, Count Numbers, StdDev, StdDevP, Var, and VarP. Choosing one of these 11 calculation options changes the data in the column. In Figure 3.29, columns B through D show various settings from the Summarize Values By tab.

Figure 3.29

Figure 3.29. Choose from the 11 summary calculations on this tab.

Column B is the default Sum calculation. It shows the total of all records for a given market. Column C shows the Average order for each item by Market. Column D shows a count of the records. You can change the heading to say “# of Orders” or “# of Records” or whatever is appropriate. Note that the count is the actual count of records, not the count of distinct items. Counting distinct items has been difficult in pivot tables, but now is possible using PowerPivot. See Chapter 10 for more details.

Far more interesting options appear on the Show Values As tab of the Value Field Settings dialog, as shown in Figure 3.30. Fifteen options appear in the drop-down. Depending on the option you choose, you might need to specify either a Base Field or a Base Field and a Base Item. Columns E through J in Figure 3.29 show some of the calculations possible using Show Values As.

Figure 3.30

Figure 3.30. Fifteen different ways to show data are available on this tab.

Table 3.1 summarizes the Show Values As options.

Table 3.1. Calculations in Show Value As

Show Value As

Additional Required Information

Description

No Calculation

None

 

% of Grand Total

None

Shows percentages so all the detail cells in the pivot table total 100%.

% of Column Total

None

Shows percentages that total up and down the pivot table to 100%.

% of Row Total

None

Shows percentages that total across the pivot table to 100%.

% of Parent Row Total

None

With multiple row fields, shows a row’s percentage of the parent item’s total row.

% of Parent Column Total

None

With multiple column fields, shows a column’s percentage of the parent column’s total.

Index

None

Calculates the relative importance of items.

% of Parent Total

Base Field only

With multiple row and/or column fields, calculates a cell’s percent of the parent item’s total.

Running Total In

Base Field only

Calculates a running total.

% Running Total In

Base Field only

Calculates a running total as a percentage of the total.

Rank Smallest to Largest

Base Field only

Provides a numeric rank, with 1 as the smallest item.

Rank Largest to Smallest

Base Field only

Provides a numeric rank, with 1 as the largest item.

% of

Base Field and Base Item

Expresses the values for one item as a percentage of another item.

Difference From

Base Field and Base Item

Shows the difference of one item compared to another item or to the previous item.

% Difference From

Base Field and Base Item

Shows the percent difference of one item compared to another item or to the previous item.

The capability to create custom calculations is another example of the unique flexibility of pivot table reports. With the Show Data As setting, you can change the calculation for a particular data field to be based on other cells in the VALUES area.

The following sections illustrate a number of Show Values As options.

Showing Percentage of Total

Column E of Figure 3.29 shows the % of Total. New York with $2.1 million in revenue represents 31.67% of the $6.7 million total revenue. Column E uses % of Column Total on the Show Values As tab. Two other similar options are % of Row Total and % of Grand Total. Choose one of these based on whether your text fields are going down the report, across the report, or both down and across.

Using % Of to Compare One Line to Another Line

The % Of option enables you to compare one item to another item. For example, the current data set shows that New York is the largest market. Perhaps this company started in New York and has the largest concentration of customers in New York. Perhaps the home office is in New York. The people in New York might have a New York–centric view of the world and want to show how all of the other markets are doing as a percentage of New York. Cell E6 of Figure 3.31 shows that Atlanta is about 25% the size of New York in sales.

Figure 3.31

Figure 3.31. This report is created using the % Of option with New York as the Base Item.

To set up this calculation, choose Show Values As, % Of. For the Base Field, choose Market because this is the only field in the ROWS area. For the Base Item, choose New York. The result is shown in Figure 3.31.

Showing Rank

Two ranking options were added in Excel 2010. Column G of Figure 3.32 shows Rank Largest to Smallest. New York is ranked #1, Minneapolis is #12. A similar option is Rank Smallest to Largest, which would be good for the pro golf tour.

Figure 3.32

Figure 3.32. The Rank options were added in Excel 2010.

To set up a rank, choose Value Field Settings, Show Values As, Rank Largest to Smallest. You are required to choose a Base Field. In this example, because Market is the only row field, it is the Base Field.

These rank options in Excel 2013 show that pivot tables have a strange way of dealing with ties. I say strange because they do not match any of the methods already established by the Excel functions =RANK(), =RANK.AVG(), and =RANK.EQ(). For example, if the top two markets have a tie, they are both assigned a rank of 1, and the third market is assigned a rank of 2.

Tracking Running Total and Percent of Running Total

Running total calculations is common in reports where you have months running down the column or when you want to show that the top N customers make up N% of the revenue. The Running Total In calculation has been in Excel for many versions. The % Running Total In setting was added in Excel 2010.

In Figure 3.33, cell I8 shows that the top four markets account for 76.97% of the total sales.

Figure 3.33

Figure 3.33. Show running totals or a running percentage of total.

To specify Running Total In (as shown in Column H) or % Running Total In (Column J), select Field Settings, Show Values As, Running Total In. You have to specify a Base Field, which in this case is the row field: Market.

Display Change from a Previous Field

Figure 3.34 shows the % Difference From setting. This calculation requires a base field and base item. You could show how each market compares to New York by specifying New York as the base item. This would be similar to Figure 3.31, except each market would be shown as a percentage of New York.

Figure 3.34

Figure 3.34. The % Difference From options enable you to compare each row to the previous or next row.

When you have date fields, it would make sense to use % Difference From and choose (previous) as the base item. Note the first cell will not have a calculation because there is no previous data in the pivot table.

Tracking Percent of Parent Item

The legacy % of Total settings always divide the current item by the grand total. In Figure 3.35, cell E4 says that Chicago is 2.75% of the total data set. A common question at the MrExcel.com message board is how to calculate Chicago’s revenue as a percentage of the Midwest region total. This was possible but difficult before Excel 2010. Starting in Excel 2010, Excel added the % of Parent Row, % of Parent Column, and % of Parent Total.

Figure 3.35

Figure 3.35. An option in Excel 2013 enables you to calculate a percentage of the parent row.

To set up this calculation in Excel 2013, use Field Settings, Show Values As, % of Parent Row Total. Cell D4 in Figure 3.35 shows that Chicago’s $184K is 10.59% of the Midwest Total of $1,741K.

Although it makes sense, the calculation on the subtotal rows might seem confusing. D4:D8 shows the percentage of each market as compared to the Midwest total. The values in D9, D11, D16, and D19 are comparing the region total to the grand total. For example, the 31.67% in D11 is saying that the Northeast region’s $2.1 million is a little less than a third of the $6.7 million grand total.

Track Relative Importance with the Index Option

The final option, Index, creates a somewhat obscure calculation. Microsoft claims that this calculation describes the relative importance of a cell within a column. In Figure 3.36, Georgia peaches have an index of 2.55 and California peaches have an index of 0.50. If the peach crop is wiped out next year, it will be more devastating to Georgia fruit production than to California fruit production.

Figure 3.36

Figure 3.36. Using the Index function, Excel shows that peach sales are more important in Georgia than in California.

Here is the exact calculation: First, divide Georgia peaches by Georgia total. This is 180/210, or 0.86. Next, divide total peach production (285) by total fruit production (847). This shows that peaches have an importance ratio of 0.34. Now, divide the first ratio by the second ratio: 0.86 / 0.34.

In Ohio, apples have an index of 4.91, so an apple blight would be bad forthe Ohio fruit industry.

However, even after writing about this calculation for 10 years, there are parts that I don’t quite comprehend. What if a state like Hawaii relied on productions of lychees but lychees were nearly immaterial to U.S. fruit production? If lychees were half of Hawaii fruit production, but 0.001 of U.S. fruit production, the Index calculation would skyrocket to 500.

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