Understanding Cost History in Azure
Tracking cloud spending over time is fundamental to FinOps maturity. A cost history dashboard shows not just what you are spending today, but how spending has evolved across months and quarters, where trends are heading, and whether your optimization efforts are actually reducing costs. Azure Cost Management provides built-in tools for historical analysis, from smart views in the portal to custom Power BI reports backed by exported data.
This guide walks through building a cost history dashboard using Azure Cost Management’s native features, Power BI integration, and the Cost Management APIs. You will learn how to create views that track spending patterns over 12+ months, identify seasonal variations, and provide financial teams with the trend data they need for forecasting and budget planning.
Azure Cost Analysis Smart Views
Azure Cost Management includes several pre-built smart views that provide immediate cost history visualization. These views are available directly in the Azure portal without any additional setup.
Accumulated Costs View
The Accumulated Costs view shows a running total of spend against your budget over time. This is the most useful view for tracking whether you are on pace to stay within budget for the current period.
- Navigate to Cost Management in the Azure portal.
- Select your scope (subscription, resource group, or management group).
- Click Cost analysis in the left menu.
- Select Accumulated costs from the view dropdown.
- The chart shows actual spend (solid line), forecast (dashed line), and budget (horizontal line).
Key metrics displayed in this view include total cost, average daily cost, percentage change versus the previous period, and a forecast of where spending will land by the end of the current period.
Cost by Service View
This view provides a month-over-month comparison of spending by Azure service. It is particularly valuable for identifying which services are growing fastest and where optimization efforts should focus.
- In Cost analysis, select Cost by service from the view dropdown.
- The view shows a bar chart with the current and previous month side by side for each service.
- Services are sorted by current month spend, making it easy to spot the top cost drivers.
Daily Costs View
For granular trend analysis, the Daily Costs view breaks spending down to individual days. Use this to identify spending spikes, weekend/weekday patterns, and the impact of deployments or configuration changes.
Customizing Views for Cost History
Smart views provide a starting point, but custom views let you build the exact historical comparison you need. The key configuration options for a cost history dashboard are date range, granularity, grouping, and chart type.
Configuring Date Ranges
Azure Cost Management supports several predefined date ranges plus custom periods:
- Last 7 days — Short-term operational view
- This month — Current billing period
- Last month — Previous complete billing period
- Last 3 months — Quarterly trend analysis
- Last 6 months — Semi-annual patterns
- Last 12 months — Full annual view including seasonal patterns
- Custom range — Any start and end date within the data retention window
For a cost history dashboard, the Last 12 months range with Monthly granularity provides the best balance of trend visibility and readability. For investigation of specific anomalies, narrow the range and switch to Daily granularity.
Grouping and Filtering
The Group by selector determines how costs are segmented in the chart. Available dimensions include:
| Group By | Use Case |
|---|---|
| Resource group | Team or project-level cost tracking |
| Service name | Identify which Azure services drive spend |
| Subscription | Cross-subscription comparison |
| Location | Regional cost distribution |
| Tag (any key) | Business-aligned grouping (cost center, environment, owner) |
| Meter category | Detailed resource type breakdown |
| Provider | Distinguish Azure, Marketplace, and support costs |
Combine grouping with filters to create focused views. For example, filter to a specific resource group and group by service name to see exactly what services that team is consuming.
Saving and Sharing Views
After configuring a view, save it for future use:
- Click Save in the toolbar.
- Give the view a descriptive name (e.g., “Monthly Cost by Team – 12mo”).
- The view is saved at the current scope and accessible by anyone with Cost Management Reader access.
To add the view to an Azure Dashboard, click the Pin icon. This creates a live-updating tile on your portal dashboard that shows the cost chart without navigating to Cost analysis.
Setting Up Scheduled Email Reports
Cost history dashboards are more effective when they reach stakeholders automatically. Azure Cost Management supports scheduled subscriptions that email cost analysis snapshots on a recurring basis.
- Open a saved cost analysis view.
- Click Subscribe in the toolbar.
- Configure the subscription:
- Frequency: Daily, Weekly, or Monthly
- Start date and End date
- Recipients: Email addresses (up to 20)
- Subject: Custom email subject line
- Include chart: Toggle to include the visualization
- Click Create.
Recipients receive an email with the chart image and a link to the live view in the Azure portal. This is an effective way to deliver weekly cost trend summaries to engineering managers and monthly reports to finance teams.
Cost Forecasting with WaveNet
Azure Cost Management’s built-in forecasting uses a WaveNet deep learning model to predict future spending based on historical patterns. The forecast appears as a dashed line on area and column stacked charts in Cost analysis.
How Forecasting Works
- The model analyzes historical usage patterns to project future costs.
- For short-term forecasts (within the current month), it uses approximately 28 days of lookback data.
- For longer forecasts (quarterly or annual), it uses up to 90 days of historical data.
- Microsoft recommends at least 90 days of historical data for accurate annual forecasts.
- Forecasts are available in area chart and column stacked chart views only.
Using Forecasts for Budget Planning
The forecast projection helps answer the question “Where will we land at end of month?” This is especially valuable in the first two weeks of a billing period when actual spend is low but the trajectory matters.
To get the most value from forecasting:
- Create an Accumulated costs view with a budget line.
- The forecast shows whether you are on track to exceed the budget.
- Combine with forecast-based budget alerts (see the budget alerts guide) to receive proactive warnings when the forecast predicts a budget breach.
Building a Power BI Cost History Dashboard
For richer historical analysis beyond what the portal provides, Power BI enables custom calculations, YoY comparisons, and integration with non-Azure data sources.
Connecting to Cost Management Data
Power BI Desktop → Get Data → Azure → Azure Cost Management
→ Select "Enrollment Number" (EA) or "Billing Profile" (MCA)
→ Enter your scope identifier
→ Select tables: Usage Details (required), Budgets, Balance Summary
→ Set date range to last 13 months for YoY analysis
→ Load
Essential DAX Measures for Cost History
Create these DAX measures to power your cost history dashboard:
// Total Cost
Total Cost = SUM('Usage Details'[CostInBillingCurrency])
// Previous Month Cost
Previous Month Cost =
CALCULATE(
[Total Cost],
DATEADD('Calendar'[Date], -1, MONTH)
)
// Month-over-Month Change %
MoM Change % =
DIVIDE(
[Total Cost] - [Previous Month Cost],
[Previous Month Cost],
0
)
// Year-over-Year Cost
YoY Cost =
CALCULATE(
[Total Cost],
DATEADD('Calendar'[Date], -1, YEAR)
)
// Running Total (Accumulated)
Running Total =
CALCULATE(
[Total Cost],
FILTER(
ALLSELECTED('Calendar'[Date]),
'Calendar'[Date] <= MAX('Calendar'[Date])
)
)
// 7-Day Moving Average
7-Day Moving Average =
AVERAGEX(
DATESINPERIOD('Calendar'[Date], MAX('Calendar'[Date]), -7, DAY),
[Total Cost]
)
Dashboard Layout
An effective cost history dashboard in Power BI includes these pages:
- Executive Summary — KPI cards (total spend, MoM change, YoY change, forecast), line chart of monthly trend for 12 months, top 5 cost drivers.
- Service Trends — Stacked area chart showing cost by service over 12 months, with a table showing absolute and percentage changes.
- Subscription Analysis — Matrix showing monthly costs per subscription, with conditional formatting to highlight growth.
- Resource Group Drill-Down — Treemap of current month costs with drill-through to historical detail for any resource group.
- Anomaly Investigation — Daily cost chart with reference lines for average and standard deviation, helping identify outlier spending days.
Using Azure Data Explorer for Long-Term History
For organizations that need to query years of cost history with sub-second response times, Azure Data Explorer (ADX) provides an ideal analytical backend. ADX handles terabytes of time-series data efficiently with its columnar storage engine.
// Monthly cost trend by service for the last 12 months
CostData
| where Timestamp > ago(365d)
| summarize TotalCost = sum(CostInBillingCurrency) by
Month = startofmonth(Timestamp),
ServiceName
| order by Month asc, TotalCost desc
// Identify significant month-over-month changes
CostData
| where Timestamp > ago(60d)
| summarize MonthlyCost = sum(CostInBillingCurrency) by
Month = startofmonth(Timestamp),
ResourceGroup
| serialize
| extend PreviousMonthCost = prev(MonthlyCost, 1)
| extend ChangePercent = round((MonthlyCost - PreviousMonthCost) / PreviousMonthCost * 100, 2)
| where abs(ChangePercent) > 20
| order by abs(ChangePercent) desc
// Daily cost anomaly detection using built-in function
CostData
| where Timestamp > ago(90d)
| make-series DailyCost = sum(CostInBillingCurrency) on Timestamp step 1d
| extend (anomalies, score, baseline) = series_decompose_anomalies(DailyCost, 1.5)
| mv-expand Timestamp, DailyCost, anomalies, score, baseline
| where anomalies != 0
Automating Dashboard Refresh
A cost history dashboard must stay current to be useful. Configure automated refresh at each layer of the architecture:
- Cost exports — Schedule daily exports so new data arrives in blob storage every day.
- Data pipeline — Configure blob-triggered or time-triggered pipeline runs to process new exports as they arrive.
- Power BI dataset — Set up scheduled refresh in the Power BI service (up to 8 times per day on Pro, 48 times on Premium).
- Dashboard cache — Power BI dashboard tiles cache data independently of the dataset. Pin live report pages instead of individual tiles for the most current data.
Adding Context to Cost History
Raw cost numbers become much more meaningful with context. Annotate your cost history dashboard with business events that explain spending changes:
| Annotation Type | Example | Impact |
|---|---|---|
| Deployment events | “Migrated DB to Premium tier” | Explains cost increase |
| Optimization actions | “Applied RI for prod VMs” | Explains cost decrease |
| Business events | “Black Friday traffic surge” | Explains temporary spike |
| Policy changes | “Enforced auto-shutdown for dev VMs” | Explains gradual decrease |
In Power BI, create an annotations table and overlay it on your time series charts as vertical reference lines or bookmark-triggered callouts.
Sharing and Access Control
Different stakeholders need different views of cost history:
- Finance teams — Full organizational view with monthly rollups, budget comparisons, and forecast accuracy tracking. Share via Power BI app with monthly scheduled refresh.
- Engineering managers — Filtered to their team’s subscriptions or resource groups, with daily granularity for operational decisions. Share via Power BI workspace with daily refresh.
- Individual contributors — Portal-based Azure Dashboard with pinned cost analysis views scoped to their resource groups.
- Executives — Power BI paginated report delivered as a monthly PDF with executive summary, YoY comparison, and top-line metrics.
Common Pitfalls and Best Practices
- Data retention in portal — Azure Cost analysis supports up to 13 months of data in the portal. For longer history, export data to your own storage and use Power BI or ADX.
- Forecast accuracy — Forecasts are most accurate with at least 90 days of consistent historical data. New subscriptions or significant usage pattern changes reduce forecast reliability.
- Mixing actual and amortized costs — Never mix these in the same trend view. Reservation purchases create misleading spikes in actual cost views that do not represent real spending changes.
- Granularity selection — Daily granularity over 12 months creates noisy charts. Use monthly granularity for strategic views and daily only for operational investigation.
- Time zone awareness — All Azure cost data uses UTC. Align your dashboard time zone to UTC to avoid mismatches with the underlying data.
- Stale dashboard syndrome — A dashboard nobody checks is worse than no dashboard. Pair visualizations with automated alerts and scheduled email delivery to drive engagement.
Conclusion
A well-built cost history dashboard turns raw spending data into organizational intelligence. Start with the built-in smart views in Azure Cost Management for immediate visibility, add scheduled email subscriptions to push trend data to stakeholders, and invest in Power BI or Azure Data Explorer for advanced historical analysis when your organization outgrows the portal capabilities. The most effective dashboards combine trend visualization with business context — annotations that explain why costs changed, not just that they changed — giving every stakeholder the information they need to make informed decisions about cloud investment.