Business Analytics Dashboard · Project

Business Analytics Dashboard · Phase 3 · Lesson 1 of 3

KPI Formulas with SUMIFS, COUNTIFS and AVERAGEIFS

Calculate revenue, transactions, average basket and margin by branch and month with conditional formulas, and check each result against a manual calculation.

What you need

A computer with a spreadsheet: Google Sheets (free, online) or LibreOffice Calc (free, offline). Microsoft Excel works the same way if you already have it.

In this lesson you will

  • Use SUMIFS, COUNTIFS and AVERAGEIFS with several conditions
  • Check formula results manually

Key concepts

SUMIFSCOUNTIFSAVERAGEIFScriteria rangeaverage basketgross margin

The lesson

SUMIFS adds values that meet several conditions: =SUMIFS(Clean!G:G, Clean!B:B, "Gudele", Clean!J:J, "2026-03") gives Gudele's March revenue if column J holds the month. COUNTIFS counts matching rows and AVERAGEIFS averages them.

Build a KPI table on the Calc sheet with branches down the side and months across the top, using cell references for the conditions so one formula can be copied across the table.

Check every new formula by hand for at least one cell, using a filter on the clean data. The worked example shows the KPI calculations for one month.

Step by step

  1. Add a Month column to the clean data with a formula based on the date.
  2. Build the revenue table with SUMIFS and copy it across branches and months.
  3. Add transaction counts, average basket and gross margin.
  4. Check two cells by filtering the clean data and adding manually.
Worked calculation

March KPIs for the Juba Fresh Mart dashboard

How revenue growth, gross margin and average basket are calculated for one month from the clean sales table.

All three branches, March compared with February (illustrative figures for a fictional business, in South Sudanese pounds)
ItemWorkingAmount
Revenue, MarchSUMIFS of amount for month = March1,240,000 SSP
Revenue, FebruarySUMIFS of amount for month = February1,150,000 SSP
Month-on-month growth(1,240,000 − 1,150,000) ÷ 1,150,000≈ 7.8%
Cost of goods sold, MarchSUMIFS of quantity × unit cost for March868,000 SSP
Gross margin(1,240,000 − 868,000) ÷ 1,240,00030.0%
Average basket1,240,000 ÷ 4,960 transactions (COUNTIFS)250 SSP

Explanation

Growth is always divided by the earlier month (February), the base period.

Gross margin needs costs: without the product cost list, only revenue KPIs can be reported.

Average basket shows how much a typical customer spends per visit; it can rise even when the number of customers falls.

Check your understanding

90,000 ÷ 1,150,000 = 0.0783 (7.8%); 372,000 ÷ 1,240,000 = 0.30; 1,240,000 ÷ 4,960 = 250.

Practice activity

Build the KPI table for all branches and months and document two manual checks.

Expected result: A complete KPI table whose spot-checks match manual calculations exactly.

Common mistakes

  • Typing branch names into formulas instead of referring to cells, so copies break
  • Calculating margin from selling prices only, without costs

Check your understanding

  1. What does SUMIFS do that SUM does not?

    Show answer

    Adds only the values that meet one or more conditions.

  2. How is average basket calculated?

    Show answer

    Revenue divided by the number of transactions.

Further learning

Projects are instructor-guided: an instructor sets milestones, checks your work and gives feedback, online or in person. Self-study of the public lessons does not lead to a certificate. Enrolment and fees follow the Academy's existing policies — contact the Academy.