microsoft / microsoft/finops-toolkit
ADX dashboard: List cost / Commitment savings don't match between Summary and Rate Optimization pages
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 603
- Forks
- 249
- Avg merge
- 7d 11h
- Merged PRs (30d)
- 11
Description
🤖 [AI] Filed from findings raised in discussion #2068.
⚠️ Problem
The ADX dashboard's Summary page and Rate Optimization page show different "List cost" and "Commitment savings" numbers for the same month (reported gap: ~5.7% on List cost, ~2x on Commitment savings). Confirmed independently by two customers.
🛠️ Solution
Root cause, verified against src/templates/finops-hub/dashboard.json:
- Summary page's "Cost summary" tile (query
5ff29428…) and "Summary"/"Savings summary" tiles (e8b343dc…,f5f240a8…) compute List/Contracted/Effective cost and Commitment savings as a flatsum(ListCost)/sum(ContractedCost)/sum(EffectiveCost)overCostsByMonth/CostsByDay— with no exclusion ofChargeCategory == 'Purchase'rows. - Rate Optimization page's equivalent tiles (
e17346d1…,3b3f0a58…) already carrywhere x_AmortizationClass != 'Principal'— explicitly commented "Don't double-count commitment discount purchases."
A Reservation/Savings Plan upfront purchase row carries the full ListCost/ContractedCost with EffectiveCost ≈ 0 (the real usage cost is amortized separately). Summing it in unfiltered, as the Summary page does, inflates that month's List cost and Commitment savings by roughly the purchase amount.
Fix: add the same x_AmortizationClass != 'Principal' exclusion to the three Summary-page queries, mirroring the existing Rate Optimization pattern.
ℹ️ Additional context
- Not a duplicate of #2214/#2286 (different mechanism, already covered by #2248) or #1424/#2176 (wrong savings within Rate Optimization, not cross-page).
- PR #2248 does not fix this — it touches two of the three affected Summary tiles but doesn't add the Purchase-row exclusion, so this will persist even after #2248 merges.
- Small, low-risk, well-scoped fix — no new logic to invent, just apply the existing Rate Optimization pattern to the Summary page.
Related: #2068 (discussion)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open src/templates/finops-hub/dashboard.json and compare the three Summary-page queries (5ff29428…, e8b343dc…, and f5f240a8…) with the existing Rate Optimization queries (e17346d1… and 3b3f0a58…). Verify that all three Summary queries exclude x_AmortizationClass == 'Principal', then confirm their List cost and Commitment savings calculations no longer include purchase rows.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- analytics, cloud
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100