// Top N Services by Cost (Custom Date Range) // Returns the top N services by total effective cost for the specified date range (default N=10). // Parameters: N (default: 10), startDate, endDate // Author: FinOps Toolkit Team // Last Tested: 2025-05-17 // let N = 10; let startDate = startofmonth(ago(30d)); // Default: last month let endDate = startofmonth(now()); Costs() | where ChargePeriodStart >= startDate and ChargePeriodStart < endDate | summarize EffectiveCost = sum(EffectiveCost) by ServiceName | top N by EffectiveCost desc