Get your API key

Lesson 2 of 5

A weekly summary tab and charts in Google Sheets

AI-written SUMIFS and QUERY formulas, a pivot table to cross-check, charts, target colours, and a total that must match.

8 min Log in to open
One step at a time, like flipping pages.

By the end of this lesson your Google Sheet will have a Summary tab that calculates last week's KPIs on its own, a pivot table that proves them, and two charts with target colours, all ready for Monday morning.

You need: the tidy Sales tab and KPI dictionary from lesson 1, and any AI chat (for example the Playground) · Time: 8 minutes

  1. Your file gets three tabs. Only the first one is ever typed into:

    • Sales: the tidy raw data. A Date, B Branch, C Item, D Qty, E Amount. New rows at the bottom.
    • Targets: one row per branch. A Branch, B Weekly target (Rs). Changed only when targets change.
    • Summary: formulas only. Nobody types numbers here.

    On the Summary tab, cell B1 holds the Monday of the week the report is about. Every other formula reads it. To always get last complete week, use:

    Text
    B1: =TODAY()-WEEKDAY(TODAY(),3)-7
    B2: =B1+6

    WEEKDAY(date, 3) counts Monday as 0 and Sunday as 6, so TODAY()-WEEKDAY(TODAY(),3) is this week's Monday, and minus 7 is last week's Monday. Format both cells as dates like Mon, 9 Nov 2026 (Format → Number → Custom date and time) so the reader sees the exact week.

    Tip

    To re-run an old week (say, after late entries), type that Monday's date into B1 by hand. Every number follows. Put the formula back afterwards.

    Why?

    One week cell means one place to look and one place to change. Ten formulas that each work out "last week" on their own will, sooner or later, disagree by a day.

Log in free to read the rest of this lesson

Every lesson is free. A free account unlocks all of them and saves your progress.

Still to come in this lesson:

  1. Let the AI write the summary formulas
  2. One QUERY for a sorted branch table
  3. Cross-check with a pivot table
  4. Charts and target colours
  5. Recap