Rate against mix
Explain a change in an average: did the rate change, or did the mix of groups change?
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
Did revenue per unit change because prices moved inside categories or because the category mix shifted?
Your assistant may word its answers differently each time; the numbers come from your tables.
Did each get better, or did the crowd change?
What is it?
A class average can rise because pupils improved, or because strong pupils joined.
How does it work?
It splits the change in an average into those two reasons.
Good to know
It explains the arithmetic, not the cause.
Before you start
Load the shop sample files and save the shop_orders model first. The 'Save a model' page shows how.
Make it yours
Your assistant needs the real names. Replace the table and column names in the prompt above with yours. If you are not sure of them, ask first: "Describe my table called orders."
Then ask
Each question builds on the last answer. Ask follow-ups in plain words.
"Which category changed most?"