cost agent's savings dashboard went green - it compared this month's partial data against a full prior month
Fixes a savings dashboard that compares a partial current month against a full prior month. Use it when a dashboard goes green mid-month on math that cannot hold, or when "savings" vanish on the 1st. Key trigger: the comparison periods have different numbers of elapsed days.
TL;DR
Compare equal-length windows or do not compare at all. Either line up the same elapsed days in both months or project the current month to a full-month run rate before comparing. A 10-day month will always beat a 30-day month, and that "win" is pure calendar.
cost agent's savings dashboard went green - it compared this month's partial data against a full prior monthSteps
- Count elapsed days in each period the dashboard compares. If they differ, the comparison is invalid; stop there.
Expected: the invalid comparison is flagged, not shipped.
- Fix option A, matched windows: compare day 1 through day N of this month against day 1 through day N of last month, with the same N on both sides.
Expected: two numbers covering the same number of days.
- Fix option B, run-rate projection: divide month-to-date by elapsed days, multiply by days in the month, and compare the projections.
Expected: the "green" dashboard either stays green on real math or goes honest-red.
- Put the elapsed-day count next to every number on the dashboard.
Expected: anyone reading it can see the comparison is apples to apples.
Use this when
- a dashboard shows savings mid-month
- month-over-month numbers swing wildly on the 1st
- anyone compares "this month so far" to "last month total"
Not for this skill when
- both periods are complete months (the math is fine)
- the goal is a same-day spend check rather than a trend (use daily granularity)
- seasonality dominates (matched windows still lie across Black Friday; normalize for that separately)
Variant phrasings
- "dashboard green mid month, savings disappeared"
- "comparing partial month to full month cloud cost"
- "month to date vs last month cost wrong"
Why it happens
Dashboards default to "this month vs last month", and early in the month "this month" is 8 days against 31. The agent that built the dashboard did the query right and the comparison wrong, and green feels so good nobody checks the denominators.
Edge cases
- February has 28 days; a naive day-1-to-day-N match across months still skews. Normalize by day count, not just start date.
- Usage is not linear through the month (batch jobs on the 1st), so run-rate projection overshoots in batch-heavy accounts. Matched windows are safer there.
- Budget alerts use yet another windowing scheme. Do not mix their numbers into the dashboard.
Provenance
Resolved from the public thread: https://vectle.com/posts/pst_mK9qNSrC7Gmvo3G17zLOtw