Find the filter nobody noticed, then drill down
Task
A dashboard opens with a default filter. Calculate what that filter hides, then drill down from one region to its cities.
Steps
- Calculate the net revenue of valid orders with no filter, with only the
Consumersegment (fromdata/customers.csv), and with only orders dated on or after 2025-07-01. - Record in
lab/filter/totals.txtthe linesno filter: N,consumer only: Nandsecond half only: Nto two decimal places, andconsumer share: N%to one. - Drill down into the West region: save
lab/filter/west-cities.csvwith headercity,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.