Hiring Partners
Segilola Resources Operating LimitedTaviatech TechnologiesFCMBMTN NigeriaAdvans La Fayette Microfinance BankAboki AfricaFirst Bank of NigeriaOPay
← Pivot Tables in Excel · Lesson 5 of 13

Module FIve

📖 Every lesson in this course is free to read right here, no account needed. Create a free account to track your progress, take the exam, and earn your certificate.
5

Module 5: Performing Calculations with PivotTables

Welcome to Module 5 of Pivot Tables in Excel!

In the previous module, you learned how to arrange information using the Rows, Columns, Values and Filters areas. Now, we will learn how to use PivotTables to perform calculations.

Imagine you are managing a supermarket in Ibadan. You have hundreds of sales records, and your manager wants to know:

  • What is the total amount of sales?
  • What is the average amount customers spend?
  • Which product has the highest sales value?
  • Which product has the lowest sales value?
  • How many sales transactions were recorded?

Instead of calculating everything manually, you can use PivotTables to find these answers quickly.

What You Will Learn:
  • How PivotTable calculations work.
  • How to calculate the sum of values.
  • How to count records.
  • How to calculate averages.
  • How to find maximum and minimum values.
  • How to change the calculation in the Values area.
  • How to use multiple calculations in one PivotTable.
  • How to format calculated results.

1. What Are PivotTable Calculations?

PivotTable calculations are operations Excel performs on your data to produce useful information.

For example, if a supermarket records the following sales:

Transaction Product Sales
001 Rice ₦50,000
002 Beans ₦24,000
003 Milk ₦12,000
004 Rice ₦20,000

Excel can calculate the total sales, average sales, highest sales and lowest sales from these records.

2. Understanding the Sum Calculation

Sum means adding numbers together.

For example, if a supermarket records sales of ₦50,000, ₦24,000, ₦12,000 and ₦20,000, the total sales are:

₦50,000 + ₦24,000 + ₦12,000 + ₦20,000 = ₦106,000

A PivotTable can calculate this total automatically.

How to Calculate Total Sales

  1. Open your supermarket sales workbook.
  2. Click anywhere inside your PivotTable.
  3. Find the PivotTable Fields panel.
  4. Drag Product into the Rows area.
  5. Drag Sales into the Values area.
  6. Check the results displayed in your PivotTable.

Excel will usually use Sum of Sales when the Sales field contains numerical values.

Your report may look like this:

Product Total Sales
Beans₦24,000
Milk₦12,000
Rice₦70,000
Grand Total₦106,000

3. Understanding the Count Calculation

Count tells you how many records or entries are in your dataset.

Imagine a supermarket wants to know how many sales transactions were recorded during the week.

If there are 100 transaction records, the count is 100.

How to Count Sales Records

  1. Click inside your PivotTable.
  2. Drag Product into Rows.
  3. Drag Transaction ID into Values.
  4. Open the dropdown beside the field in the Values area.
  5. Select Value Field Settings.
  6. Choose Count.
  7. Click OK.

Excel will count the non-empty transaction IDs for each product.

Your report may look like this:

Product Number of Transactions
Beans1
Milk1
Rice2
Grand Total4
Important:

Count counts non-empty entries. If you want to count numerical values only, use Count Numbers where available. If you want to count distinct customers or unique IDs, you may need a suitable Data Model or another method.

4. Understanding the Average Calculation

Average means adding a group of numbers and dividing the result by how many numbers there are.

For example, imagine three customers spend the following amounts:

  • Customer 1: ₦5,000
  • Customer 2: ₦10,000
  • Customer 3: ₦15,000

The average spending is:

(₦5,000 + ₦10,000 + ₦15,000) ÷ 3 = ₦10,000

How to Calculate Average Sales

  1. Click inside your PivotTable.
  2. Place Product in Rows.
  3. Place Sales in Values.
  4. Click the dropdown beside Sum of Sales in the Values area.
  5. Select Value Field Settings.
  6. Choose Average.
  7. Click OK.

Excel will now display the average sales amount for each product instead of the total.

For example, if Rice has sales of ₦50,000 and ₦20,000, its average sales amount is:

(₦50,000 + ₦20,000) ÷ 2 = ₦35,000

5. Finding the Maximum Value

Maximum means the highest value in a group of numbers.

For example, imagine a supermarket records these daily sales amounts:

  • Monday: ₦20,000
  • Tuesday: ₦35,000
  • Wednesday: ₦50,000
  • Thursday: ₦25,000

The maximum sales value is ₦50,000 because it is the highest amount.

How to Find the Maximum Sales

  1. Click inside your PivotTable.
  2. Place Product in Rows, if you want to compare products.
  3. Place Sales in Values.
  4. Open Value Field Settings for Sales.
  5. Select Max.
  6. Click OK.

Excel will display the highest sales amount for each product.

6. Finding the Minimum Value

Minimum means the lowest value in a group of numbers.

For example, if a supermarket records the following daily sales:

  • Monday: ₦20,000
  • Tuesday: ₦35,000
  • Wednesday: ₦50,000
  • Thursday: ₦25,000

The minimum sales value is ₦20,000.

How to Find the Minimum Sales

  1. Click inside your PivotTable.
  2. Place Product in Rows.
  3. Place Sales in Values.
  4. Open Value Field Settings for Sales.
  5. Select Min.
  6. Click OK.

Excel will now show the lowest sales amount for each product.

7. Understanding Common PivotTable Calculations

Let's review the calculations we have learned.

Calculation Meaning Example
Sum Adds numbers together Total sales
Count Counts non-empty records Number of transactions
Average Calculates the mean Average customer spending
Max Finds the highest value Highest sales amount
Min Finds the lowest value Lowest sales amount

8. How to Change a PivotTable Calculation

You do not need to create a new PivotTable every time you want a different calculation.

You can change the calculation used in the Values area.

Follow these steps:

  1. Click anywhere inside your PivotTable.
  2. Find the Values area in the PivotTable Fields panel.
  3. Click the dropdown arrow beside the field you want to change.
  4. Select Value Field Settings.
  5. Choose the calculation you need, such as Sum, Count, Average, Max or Min.
  6. Click OK.

Your PivotTable will update using the new calculation.

9. Using Multiple Calculations in One PivotTable

Sometimes, a business manager wants to see more than one calculation at the same time.

For example, the supermarket manager may want to see:

  • Total sales for each product.
  • Average sales for each product.
  • Number of transactions for each product.

You can do this by adding the same field to the Values area more than once, then changing each calculation.

How to Add Multiple Calculations

  1. Place Product in Rows.
  2. Drag Sales into Values.
  3. Drag Sales into Values again.
  4. Open Value Field Settings for the second Sales field.
  5. Change the second calculation to Average.
  6. Drag Transaction ID into Values.
  7. Change its calculation to Count.

Your report may look like this:

Product Total Sales Average Sales Transactions
Beans ₦24,000 ₦24,000 1
Milk ₦12,000 ₦12,000 1
Rice ₦70,000 ₦35,000 2

This report gives the manager three different types of information in one place.

10. Formatting Calculated Values

Sometimes, your PivotTable may display numbers without the currency symbol or with too many decimal places.

You can format your results to make them easier to read.

How to Format Sales as Nigerian Naira

  1. Right-click any sales value inside the PivotTable.
  2. Select Value Field Settings.
  3. Click Number Format.
  4. Choose Currency or Accounting.
  5. Select the Nigerian naira symbol if it is available in your Excel version and regional settings.
  6. Choose the number of decimal places.
  7. Click OK, then OK again.

Your values will now display in a more professional format, such as ₦50,000.00.

Important Tip:

Use Number Format through Value Field Settings where possible. This helps preserve the formatting when the PivotTable is refreshed.

11. Understanding Sum and Count

One common problem beginners experience is seeing Count instead of Sum in the Values area.

Why does this happen?

Excel may use Count when it detects that a numerical column contains text, blanks or other inconsistent entries.

For example, imagine your Sales column contains:

  • ₦20,000
  • ₦15,000
  • Not Available
  • ₦10,000

Because the column contains text, Excel may choose Count instead of Sum.

To solve this problem:

  1. Go back to your original dataset.
  2. Check the Sales column for text entries or incorrectly stored numbers.
  3. Correct the records using reliable source information.
  4. Make sure numerical values are stored as numbers.
  5. Refresh the PivotTable.
  6. Open Value Field Settings and select Sum if necessary.

Never replace missing sales information with a guessed amount. Always check the original transaction records.

12. Practical Activity: Analyse Supermarket Sales

It is time to practise your new skills.

Imagine you are working as a junior data analyst for a supermarket with branches in Ibadan and Lagos.

The manager wants you to prepare a sales report.

Your tasks:

  1. Open your supermarket sales workbook.
  2. Create a PivotTable.
  3. Place Product in Rows.
  4. Place Sales in Values and calculate Sum.
  5. Change the calculation to Average.
  6. Change it again to Max.
  7. Change it to Min.
  8. Place Transaction ID in Values and calculate Count.
  9. Add Sales to Values more than once to display multiple calculations.
  10. Format the sales figures using Nigerian naira.
Practical Challenge:

Prepare one PivotTable showing total sales, average sales and number of transactions for each product. Write down which product has the highest total sales.

13. Common Mistakes to Avoid

  • Using Count instead of Sum: Check whether your numerical data is stored correctly.
  • Calculating the wrong average: Make sure you understand which records are included in the calculation.
  • Ignoring empty cells: Check whether missing information affects your results.
  • Using the wrong field: Use Sales for money calculations and Quantity for item calculations.
  • Formatting only the displayed cells: Use Value Field Settings to apply number formats properly.
  • Confusing sales with profit: Sales is the money received from selling products. Profit requires cost and expense information too.

14. Important Terms to Remember

  • Sum: Adds numbers together.
  • Count: Counts non-empty records or entries.
  • Average: Calculates the mean of a group of numbers.
  • Maximum: Finds the highest value.
  • Minimum: Finds the lowest value.
  • Value Field Settings: Controls the calculation performed on a field in the Values area.
  • Number Format: Controls how numbers, currencies and dates are displayed.
  • Grand Total: Displays the overall result of a PivotTable calculation.

15. Module 5 Assessment: Test Your Knowledge

Choose the correct answer for each question.

  1. What does the Sum calculation do?

    A. Deletes numbers

    B. Adds numbers together

    C. Finds the smallest number

    D. Counts text characters

  2. Which calculation finds the average value?

    A. Count

    B. Max

    C. Average

    D. Min

  3. Which calculation finds the highest value?

    A. Max

    B. Min

    C. Count

    D. Sum

  4. Which calculation finds the lowest value?

    A. Average

    B. Sum

    C. Count

    D. Min

  5. What does Count calculate?

    A. The highest price

    B. The number of non-empty entries

    C. The average sales value

    D. The total amount of money

  6. Where can you change the calculation used by a PivotTable field?

    A. Page Layout

    B. File menu

    C. Value Field Settings

    D. Print Preview

  7. What is the average of ₦5,000, ₦10,000 and ₦15,000?

    A. ₦10,000

    B. ₦15,000

    C. ₦20,000

    D. ₦30,000

  8. Which field should you use to calculate the total number of items sold?

    A. Product

    B. Branch

    C. Date

    D. Quantity

  9. Why might Excel use Count instead of Sum?

    A. The workbook has a blue heading

    B. The numerical field may contain text or inconsistent entries

    C. The computer is switched on

    D. The worksheet has a name

  10. Can you add the same field to the Values area more than once?

    A. No

    B. Only once per workbook

    C. Yes

    D. Only when printing

Assessment Answer Key

Question Correct Answer
1B
2C
3A
4D
5B
6C
7A
8D
9B
10C

16. Module Summary

Congratulations! You have completed Module 5.

You have learned how to use PivotTables to calculate sums, counts, averages, maximum values and minimum values. You also learned how to change calculations using Value Field Settings, display multiple calculations in one report and format your results.

These skills are useful for analysing supermarket sales, school records, business transactions, customer information and many other types of data.

Coming Up in Module 6:

Sorting, Filtering and Grouping PivotTable Data

In the next module, you will learn how to arrange information from highest to lowest, filter reports to show selected records, and group dates and other categories to make your analysis easier.

🏆 Get Certified

🔒

Earn this certificate

Every lesson is already free to read. Sign up, finish the lessons, pass the exam (₦2,000 or 20,000 coins), and get a verified certificate with your name on it.

🎓 Sign Up to Get Certified
🛠️ Practice Tools
Hands-on simulators & labs - subscription required.
→
🎯 Internship Tasks
Real-world tasks to build your portfolio - unlock them with a subscription.
→