What is total cloud spend, and how do you measure it in Metabase?
Definition
Total cloud spend is what your cloud usage costs per period — but the number depends entirely on the convention. Unblended cost matches the invoice; amortized cost spreads commitment prepayments over the usage they cover; net cost subtracts credits and refunds. A spend metric without its convention labeled is not a metric.
What data do you need?
- Billing export line items or daily rollups (CUR 2.0, BigQuery export)
- Pricing model per line (on-demand, Savings Plan, Reserved, spot)
- Credits, refunds, taxes, and support fees identifiable as separate types
- Amortization fields for upfront commitment purchases
- Account, service, and tag dimensions for breakdowns
SQL pattern
SELECT
date_trunc('month', usage_date) AS month,
ROUND(SUM(amortized_cost_usd) FILTER (
WHERE line_item_type NOT IN ('Credit', 'Refund', 'Tax')
), 2) AS usage_cost,
ROUND(SUM(amortized_cost_usd) FILTER (
WHERE line_item_type IN ('Credit', 'Refund')
), 2) AS credits_and_refunds,
ROUND(SUM(amortized_cost_usd), 2) AS net_total
FROM billing_line_items
GROUP BY 1
ORDER BY 1;Common pitfalls
Where does this metric apply?
This metric commonly uses data from AWS Billing, Google Cloud Billing, Vantage, CloudZero, Kubecost, plus any warehouse models built on raw billing exports at the same grain.