This use cases focuses on Effective Savings Rate (ESR) per Service.
The Effective Savings Rate is a KPI to track the efficiency of using commitment-based discounts. The KPI calculation is (Contracted Cost – Effective Cost) / Contracted Cost)
Computes the source effective savings rate, (contracted cost - effective cost) / contracted cost, by v1.0 provider and service as the raw effective_discount_ratio. Services with under $0.01 of contracted cost are excluded, because in this sample their ratios explode (Azure Data Factory has $0.0000000006 contracted, giving about -50,000×). AWS effective costs here are rounded to whole dollars, so small negative rates are sample noise.
Effective savings rate by service
Chart controls and notes
Showing the first 20 categories. Open full screen to explore all 37 categories.
Query results
Provider name
Service name
Total contracted cost
Total effective cost
Effective discount ratio
AWS
Amazon Elastic Compute Cloud
$221.00
$214.00
3.17%
Microsoft
Virtual Machines
$168.15
$188.30
-11.99%
Microsoft
Azure SQL Database
$149.04
$149.04
0%
Microsoft
SQL Database
$108.73
$108.73
0%
AWS
Datadog
$40.32
$40.32
0%
Microsoft
Azure App Service
$35.98
$35.98
0%
Microsoft
Azure Synapse Analytics
$30.24
$30.25
-0.02%
AWS
AmazonCloudWatch
$23.00
$23.00
0%
Microsoft
Microsoft.Fabric
$19.28
$19.28
0%
Microsoft
Storage Accounts
$17.55
$17.46
0.49%
Microsoft
Virtual Network
$13.09
$13.09
0%
Microsoft
Azure Load Testing
$10.00
$10.00
0%
AWS
Amazon Relational Database Service
$9.00
$9.00
0%
Microsoft
Azure Monitor
$8.75
$8.75
0%
Microsoft
Azure Kubernetes Service
$8.36
$8.36
0%
AWS
Amazon Elastic File System
$8.00
$8.00
0%
AWS
AWS Config
$6.00
$6.00
0%
Microsoft
Azure Machine Learning
$5.05
$5.05
-0%
Microsoft
Azure Container Instances
$5.02
$5.02
0%
Microsoft
Azure ExpressRoute
$4.19
$4.19
0%
AWS
Amazon Elastic Container Service for Kubernetes
$4.00
$4.00
0%
AWS
Amazon Simple Storage Service
$4.00
$4.00
0%
AWS
Elastic Load Balancing
$3.00
$3.00
0%
AWS
Savings Plans for AWS Compute usage
$2.00
$0.00
100%
Microsoft
Azure Private Link
$1.85
$1.85
0%
Microsoft
Microsoft Defender for Cloud
$0.50
$0.65
-30.06%
Microsoft
Azure Container Registry
$0.17
$0.17
0%
Microsoft
Azure Site Recovery
$0.16
$0.16
0%
Microsoft
Key Vault
$0.02
$0.02
-0.25%
Microsoft
Azure DNS
$0.02
$0.02
-0.71%
Microsoft
Azure Data Factory v2
-$0.05
-$0.04
10.04%
Microsoft
Load Balancer
-$1.39
-$1.39
0%
AWS
Amazon Virtual Private Cloud
-$2.00
-$2.00
0%
AWS
AWS Lambda
-$2.00
-$2.00
0%
AWS
Amazon CloudFront
-$3.00
-$3.00
0%
Microsoft
Azure DB for MySQL
-$4.89
-$4.89
0%
Microsoft
Virtual Machine Scale Sets
-$12.74
-$12.75
-0.1%
37 rows. Scroll inside the table to see more.
Precomputed result
Inspect Postgres SQL and original FOCUS SQL
Postgres SQL, as run
select provider_name as provider_name,
service_name as service_name,
sum(contracted_cost) as total_contracted_cost,
sum(effective_cost) as total_effective_cost,
(sum(contracted_cost) - sum(effective_cost)) / nullif(sum(contracted_cost), 0) as effective_discount_ratio
from focus.cost_and_usage
where charge_period_start >= $1::timestamptz
and charge_period_end < $2::timestamptz
group by provider_name, service_name
having abs(sum(contracted_cost)) >= 0.01
order by total_contracted_cost desc nulls last, provider_name, service_name
limit 500
SELECT
ProviderName,
ServiceName,
SUM(ContractedCost) AS TotalContractedCost,
SUM(EffectiveCost) AS TotalEffectiveCost,
(SUM(ContractedCost) - SUM(EffectiveCost)) / NULLIF(SUM(ContractedCost), 0) AS EffectiveSavingsRate
FROM focus_data_table
WHERE ChargePeriodStart >= ? AND ChargePeriodEnd < ?
GROUP BY
ProviderName,
ServiceName