Actual against budget
Budgets usually live in their own table. Use it directly.
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.
Load https://gotsimplified.com/samples/shop_budget.csv into my data lake as samples.shop_budget, replacing it if it already exists.
Download: shop_orders.csv, shop_budget.csv
Try this
Save an analytics model named shop_budget from samples.shop_budget. The date column is month. Measure planned is the sum of amount.
Compare last month's revenue by region in shop_orders with the planned amounts in shop_budget.
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.
- North is 1,099 over budget.
- West reaches 77.0% of its budget.
What you need
The shop_orders model.
How to read the answer
Each region is compared for the same dates.
Good to know
Both models need the same column name for region.