Find the filter nobody noticed, then drill down

short · 35 min · Objective 4.2

Task

A dashboard opens with a default filter. Calculate what that filter hides, then drill down from one region to its cities.

Steps

  1. Calculate the net revenue of valid orders with no filter, with only the Consumer segment (from data/customers.csv), and with only orders dated on or after 2025-07-01.
  2. Record in lab/filter/totals.txt the lines no filter: N, consumer only: N and second half only: N to two decimal places, and consumer share: N% to one.
  3. Drill down into the West region: save lab/filter/west-cities.csv with header city,orders,net_revenue, largest revenue first, to two decimal places.

Verify

These checks run in a POSIX shell with Python 3: Terminal on macOS or Linux, and on Windows Git Bash (it comes with Git for Windows) or WSL. On Windows, python3 is often a Microsoft Store placeholder that prints “Python was not found”; run alias python3=py in Git Bash first.

grep -E '^(no filter|consumer only|second half only|consumer share): ' lab/filter/totals.txt
awk -F, 'NR>1 {print $1": "$2" orders, "$3}' lab/filter/west-cities.csv

354627.14 unfiltered; 187145.50 for Consumer only, which is 52.8%; 193468.94 for the second half. A dashboard that opens on Consumer shows barely half the revenue, with nothing on screen but a filter chip to say so. West has three cities, and Greyholt leads with 51945.03.

This is an independent study companion for CompTIA Data+ DA0-002 and is not produced by or endorsed by CompTIA.