Cost Analysis Reports in Azure
Azure Cost Analysis is the reporting centre of Azure Cost Management. It lets you explore exactly where your money is going — by service, resource, tag, time period, or any combination — without writing a single query. Understanding how to use it effectively turns your billing data into actionable intelligence.
Accessing Cost Analysis
Cost Analysis is available from any scope in the Azure portal:
- Search for Cost Management + Billing in the portal search bar.
- Select Cost Management.
- In the left menu, click Cost analysis.
- Verify the scope shown at the top — you can analyse at subscription, resource group, or management group level. Click the scope selector to change it.
You can also navigate directly to cost analysis for a specific resource group by opening that resource group and clicking Cost analysis in its left menu. This is a quick way to check the cost of a specific project or environment without needing to configure filters.
Built-in Views
Cost Analysis starts with a set of built-in views that cover the most common reporting needs:
- Accumulated cost: shows cumulative spending over the selected time period with a trend line. Useful for seeing whether spend is accelerating or stable.
- Daily costs: a bar chart of day-by-day spending. Useful for spotting anomalies — a tall bar on a specific day indicates an unusual event.
- Cost by service: breaks down spend by Azure service name (e.g., Virtual Machines, SQL Database, Storage).
- Cost by resource: shows individual resource costs. This view identifies your top-spending resources by name.
- Cost by resource group: groups costs by resource group. Useful in multi-team environments where each team has its own resource group.
- Invoice details: matches the data on your actual invoice.
Grouping and Filtering
The real power of Cost Analysis comes from combining grouping dimensions and filters. Every view allows you to group costs by and filter on:
- Resource group
- Service name (e.g., “Virtual Machines”)
- Resource type (e.g., “microsoft.compute/virtualmachines”)
- Location (Azure region)
- Tag name and value (e.g.,
environment:production) - Meter category and subcategory
- Subscription (useful at management group scope)
Common analysis patterns
| Question | Group by | Filter by |
|---|---|---|
| Which team is spending the most? | Tag: team | None |
| What is production costing vs dev? | Tag: environment | None |
| What are our biggest services? | Service name | None |
| Which VMs cost the most? | Resource | Service name = Virtual Machines |
| How much did project X cost this month? | Resource | Tag: project = X |
| Which region is most expensive? | Location | None |
| What are our storage costs by tier? | Meter subcategory | Service name = Storage |
Actual Cost vs Amortised Cost
When you purchase a Reserved Instance with an upfront payment, the entire cost appears in the month of purchase under actual cost view. This creates a spike in that month’s cost report that obscures the underlying usage patterns. Amortised cost solves this by spreading the RI purchase price across all the months it covers.
For example, a 1-year upfront Reserved Instance costing $1,200 would show as a $1,200 charge in month one under actual cost, but approximately $100/month across all 12 months under amortised cost.
For day-to-day cost management and chargeback reporting, amortised cost is almost always the more useful view. Switch to it using the Cost (amortised) option in the metric selector at the top of the Cost Analysis view.
When presenting cost reports to stakeholders, use amortised cost unless they specifically need to see cash flow timing. Amortised cost makes month-over-month comparisons much more meaningful because it eliminates one-time purchase spikes.
Saving and Sharing Custom Views
Once you have configured a useful combination of grouping, filters, and time range, you can save it as a named view that you and your team can return to without reconfiguring:
- Configure the view as desired.
- Click Save at the top of the Cost Analysis pane.
- Give the view a descriptive name like “Production VMs — Monthly Amortised” or “Team Alpha Tag Costs”.
- Choose whether to save as private (only you can see it) or shared (visible to anyone with access to the scope).
Saved views appear in the left navigation panel under Views, making them quick to access for regular reviews such as weekly cost check-ins or monthly finance reporting.
Exporting and Querying Cost Data
For recurring reporting needs, manual portal exploration is not scalable. Azure provides two better alternatives:
Scheduled exports
Cost Management can export daily, weekly, or monthly cost data automatically to an Azure Storage account as CSV files. This is the recommended approach for feeding cost data into data warehouses, Power BI reports, or custom dashboards.
# Create a scheduled export of monthly costs to a storage account
az costmanagement export create \
--name "monthly-cost-export" \
--scope "/subscriptions/$(az account show --query id -o tsv)" \
--type ActualCost \
--dataset-granularity Monthly \
--recurrence Monthly \
--recurrence-period from="2026-04-01" to="2027-04-01" \
--storage-account-id "/subscriptions/{sub-id}/resourceGroups/{rg}/providers/Microsoft.Storage/storageAccounts/{account}" \
--storage-container "cost-exports" \
--storage-directory "monthly"Cost Management API query
# Query costs via CLI for the current month grouped by service
az costmanagement query \
--type Usage \
--scope "/subscriptions/$(az account show --query id -o tsv)" \
--timeframe MonthToDate \
--dataset-granularity None \
--dataset-aggregation "{\"totalCost\":{\"name\":\"Cost\",\"function\":\"Sum\"}}" \
--dataset-grouping "[{\"name\":\"ServiceName\",\"type\":\"Dimension\"}]" \
--query "properties.rows" \
--output table
# Same query but grouped by resource group
az costmanagement query \
--type Usage \
--scope "/subscriptions/$(az account show --query id -o tsv)" \
--timeframe MonthToDate \
--dataset-granularity None \
--dataset-aggregation "{\"totalCost\":{\"name\":\"Cost\",\"function\":\"Sum\"}}" \
--dataset-grouping "[{\"name\":\"ResourceGroupName\",\"type\":\"Dimension\"}]" \
--query "properties.rows" \
--output tableThe Importance of Tagging for Cost Analysis
Cost Analysis is only as useful as your tagging strategy. Without consistent tags, the “group by tag” views are meaningless. At minimum, every resource that incurs cost should have:
environment: production, staging, development, or testteamorowner: identifies which team owns the resourceprojectorapplication: ties the resource to a business application or initiativecost-centre: the finance cost centre for chargeback or showback
Tags are applied at the resource or resource group level. Enforce tagging with Azure Policy to ensure new resources are always tagged correctly from creation.
# Apply tags to an existing resource group
az tag update \
--resource-id "/subscriptions/{sub-id}/resourceGroups/my-rg" \
--operation Merge \
--tags environment=production team=platform project=myapp cost-centre=IT001
# List all resources missing required tags in a subscription
az resource list \
--query "[?tags.environment == null].{Name:name, Type:type, RG:resourceGroup}" \
--output tableCommon Mistakes
- Reviewing costs only when something goes wrong. Schedule a weekly cost review using saved Cost Analysis views. Catching a 20% cost increase in week two of the month is actionable; discovering it on day 30 is not.
- Looking at actual cost when you have Reserved Instances. The upfront RI payment distorts actual cost views. Always switch to amortised cost for meaningful per-resource and per-team reporting.
- Not exporting data for historical trend analysis. The portal’s 13-month retention window is enough for basic trends but not for multi-year analysis. Set up scheduled exports to storage from day one.
- Ignoring the meter subcategory dimension. Service name groups all Storage costs together. Meter subcategory breaks Storage into hot tier, cool tier, archive tier, operations, egress, and so on. Use it for any service where pricing varies significantly by operation type.
Summary
- Cost Analysis is Azure’s interactive reporting tool for exploring spend by any dimension: service, resource, tag, time period, or location.
- Use amortised cost view rather than actual cost when you have Reserved Instances or Savings Plans — it produces more meaningful per-resource comparisons.
- Save frequently-used views and schedule automated CSV exports to storage for recurring reports and data warehouse feeds.
- A consistent tagging strategy is a prerequisite for getting value from tag-based cost analysis.
Frequently asked questions
How far back does Azure Cost Analysis show data?
Azure Cost Management retains cost data for up to 13 months. You can view and query historical data for any period within that window using the custom date range option.
Can I export cost data to Excel or Power BI?
Yes. Cost Analysis lets you download the current view as a CSV. You can also connect Power BI directly to Azure Cost Management using the Power BI Connector, which enables richer visualisations and scheduled data refreshes.
What is the difference between actual cost and amortised cost in Cost Analysis?
Actual cost shows charges as they appear on your invoice, including upfront Reserved Instance payments in the month they were purchased. Amortised cost spreads RI and Savings Plan charges evenly across the period they cover, making it easier to understand per-resource costs.