Cost comparison

Prev Next

Overview

Cost comparison is a document type in Azure Documenter that compares the costs of subscriptions and resources across two different billing periods.

Business value

Cost comparison documents let finance and cloud operations teams quantify cost changes across billing periods at the resource, resource group, resource type, and location level, without manually cross-referencing two separate cost exports.

Prerequisites

Required permissions

Role Permission level Access
Account owner, Owner, Contributor - Full access to the Documentation section
Custom role Read View documents generated under Documentation
Custom role Manage View, generate, and manage documents under Documentation

How it works

The Cost comparison document shows cost data for each subscription across two billing periods, broken down by multiple dimensions for a complete picture of cost movement.

Summary

The document opens with a summary table listing all selected subscriptions with their Date Range 1 cost, Date Range 2 cost, Cost Change (USD), and Change %, providing an immediate cross-subscription view.

Per-subscription breakdowns

For each subscription, the document provides six cost comparison tables:

  • Resource cost comparison: per-resource costs across both date ranges, with Cost Change and Change %
  • Resource type cost comparison: costs grouped by Azure resource type (e.g., SQL Databases, App Services, Virtual Machines)
  • Resource group cost comparison: costs grouped by resource group
  • Location cost comparison: costs grouped by Azure region
  • Tag cost comparison: costs grouped by resource tags; shown as "Unable to retrieve" if Azure tag data is unavailable
  • Service name cost comparison: costs grouped by Azure service name (e.g., SQL Database, Azure App Service, Virtual Network)

Each comparison table shows the entity name alongside Date Range 1 cost, Date Range 2 cost, Cost Change (USD), and Change %. Cost increases are shown with an up arrow (↑) and cost decreases with a down arrow (↓).

Comparison insights

The change percentage for each organized category is shown in the generated document for the two date ranges. Red values denote an increase in cost for the category; green values denote a decrease in cost, since a cost reduction is in the user's favor.

The generated document also includes a section listing subscriptions that have no difference between the two comparison periods.

Steps

Use the following steps to generate a Cost comparison document. Navigate to Azure Documenter to get started.

  1. Click New configuration. The Configure your document wizard opens.
  2. In Step 1: Basics, enter a configuration name. Under Choose document type, select Cost comparison. Configure the following options:
    • Date range 1: the first billing period for comparison (default: Last month)
    • Date range 2: the second billing period for comparison (default: This month)
    • Currency: the currency in which cost data is displayed
    • Ignore cost lesser than: excludes resources below the specified cost threshold from the output (default: 0)
  3. In Step 2: Service principal, select the service principal and configure the subscription scope. Click Next.
  4. Complete Steps 3–6 (Branding, Publish settings, Schedule, Notifications) as required. Click Next after each step.
  5. In Step 7: Review, confirm your configuration and click Finish.

Once generation is complete, a URL is created for the document, and you can download it using the Download link.

Example scenario

A finance team wants to understand why cloud spend increased month over month. They generate a Cost comparison document for their production subscriptions with Date range 1 set to the prior month and Date range 2 set to the current month, then review the resource groups flagged in red for the largest increases.

Troubleshooting

  1. Cost comparison document shows no data for one date range
    Cause: no billing data exists for the selected period, for example a future month or a period with no activity.
    Fix: select a date range with confirmed billing history and regenerate.

  2. Document generation fails or returns incomplete data
    Cause: the service principal lacks billing read permissions on one or more selected subscriptions.
    Fix: verify the service principal has at least Reader access on all selected subscriptions, then regenerate.

  3. Cost values appear in an unexpected currency
    Cause: the Currency setting was not applied, or the subscription's native billing currency differs from the configured value.
    Fix: edit the configuration, verify the Currency field in Step 1: Basics, and regenerate.

FAQs

  1. What do the red and green values in a Cost comparison document mean?
    Red values denote an increase in cost for that category between the two date ranges. Green values denote a decrease in cost, since a reduction is in the user's favor.

  2. What happens to subscriptions that show no cost difference between the two date ranges?
    They are listed separately in a dedicated section of the generated document rather than mixed in with subscriptions that show a change.

  3. Can I filter out low-cost resources from the comparison?
    Yes. Set the Ignore cost lesser than value in Step 1: Basics to exclude resources below that cost threshold.

Related articles