Compare with an earlier period
The most common question in business: is it up or down?
Sample data
Made-up data. If you have not loaded it yet, ask your assistant:
Load https://gotsimplified.com/samples/shop_orders.csv into my data lake as samples.shop_orders, replacing it if it already exists.
Download: shop_orders.csv
Try this
Using shop_orders, how did revenue last month compare with the month before, by region?
How does that month compare with the same month a year ago?
Compare like for like: only customers who bought in both months.
Your assistant may word its answers differently each time; the numbers come from your tables.
What you should see
With the sample data. Use these to check the answer.
- October against September: 6,546 against 6,469, up 1.2%.
- North is up 540 while south is down 257.
- A year ago the month was 4,167.
- Like for like: 3,623 against 3,518.
What you need
The shop_orders model.
How to read the answer
The latest finished month is used. November is unfinished in this data, and the answer says so.
Good to know
Like for like counts only customers present in both months, so its totals are smaller.