Training
Module
Export data from Dataverse and use Microsoft Excel to edit records - Training
Discover how to export and edit Microsoft Dataverse table data using Excel files, while understanding security concepts.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
If you read the Cost Analysis tutorial, then you're familiar with manually downloading your Cost Management data. However, you can create a recurring task that automatically exports your Cost Management data to Azure storage on a daily, weekly, or monthly basis. Exported data is in CSV format and it contains all the information that Cost Management collects. You can then use the exported data in Azure storage with external systems and combine it with your own custom data. And you can use your exported data in an external system like a dashboard or other financial system.
Watch the How to schedule exports to storage with Cost Management video about creating a scheduled export of your Azure cost data to Azure Storage. To watch other videos, visit the Cost Management YouTube channel.
The examples in this tutorial walk you through exporting your cost management data and then verify that the data was successfully exported.
In this tutorial, you learn how to:
Data export is available for various Azure account types, including Enterprise Agreement (EA) and Microsoft Customer Agreement customers. To view the full list of supported account types, see Understand Cost Management data. The following Azure permissions, or scopes, are supported per subscription for data export by user and group. For more information about scopes, see Understand and work with scopes.
For Azure Storage accounts:
Microsoft.Authorization/roleAssignments/write
and Microsoft.Authorization/permissions/read
permissions.
Additionally, ensure that you enable Allow trusted Azure service access to the storage account when you configure the firewall. If you want to use the Exports REST API to generate exports to a storage account located behind a firewall, use the API version 2023-08-01 or later version. All newer API versions continue to support exports behind the firewall.If you have a new subscription, you can't immediately use Cost Management features. It might take up to 48 hours before you can use all Cost Management features.
Sign in to the Azure portal at https://portal.azure.com.
To create or view a data export or to schedule an export, choose a scope in the Azure portal and select Cost analysis in the menu. For example, navigate to Subscriptions, select a subscription from the list, and then select Cost analysis in the menu. At the top of the Cost analysis page, select Configure subscription, then Exports.
Note
Your new export appears in the list of exports. By default, new exports are enabled. If you want to disable or delete a scheduled export, select any item in the list, and then select either Disable or Delete.
Initially, it can take 12-24 hours before the export runs. However, it can take up longer before data is shown in exported files.
If you need to export to a storage account behind the firewall for security and compliance requirements, ensure that you have all prerequisites met.
Note
If you have an existing scheduled export and your change your storage network configuration, you must update the export and save it to reflect the changes.
Enable Allow trusted Azure services access on the storage account. You can turn that on while configuring the firewall of the storage account, from the Networking page. Here's a screenshot showing the page.
If you missed enabling that setting, you can easily do so from the Exports page when creating a new export.
A system-assigned managed identity is created for a new job export when created or modified. You must have permissions because Cost Management uses the privilege to assign the StorageBlobDataContributor role to the managed identity. The permission is restricted to the storage account container scope. After the export job is created or updated, the user doesn't require Owner permissions for regular runtime operations.
Note
microsoft.Authorization/roleAssignments/delete
permissions. If the permissions aren't available, the user needs to manually remove the role assignment on the managed identity.Add exports to the list of trusted services. For more information, see Trusted access based on a managed identity.
Scheduled exports get affected by the time and day of week of when you initially create the export. When you create a scheduled export, the export runs at the same frequency for each export that runs later. For example, the export runs during once each UTC day for a daily export of month-to-date costs export set at a daily frequency. Similarly for a weekly export, the export runs every week on the same UTC day as it is scheduled. Individual export runs can occur at different times throughout the day. So, avoid taking a firm dependency on the exact time of the export runs. Run timing depends on the active load present in Azure during a given UTC day. When an export run begins, your data should be available within 4 hours.
Exports are scheduled using Coordinated Universal Time (UTC). The Exports API always uses and displays UTC.
recurrencePeriod
in UTC time. The API doesn’t convert your local time to UTC.
recurrencePeriod
set to 2:00 PM. The API receives the input as 2:00 PM UTC, Friday, August 19. The weekly export is scheduled to run every Friday.Each export creates a new file, so older exports aren't overwritten.
You can use a management group to aggregate subscription cost information in a single container. Exports support management group scope for Enterprise Agreement but not for Microsoft Customer Agreement or other subscription types. Multiple currencies are also not supported in management group exports.
Exports at the management group scope support only usage charges. Purchases, including reservations and savings plans aren't supported. Amortized cost reports are also not supported. When you create an export from the Azure portal for a management group scope, the metric field isn't shown because it defaults to the usage type. When you create a management group scope export using the REST API, choose ExportType as Usage
.
If you have a Microsoft Customer Agreement, Microsoft Partner Agreement, or Enterprise Agreement, you can enable Exports to chunk your file into multiple smaller file partitions to help with data ingestion. When you initially configure your export, set the File Partitioning setting to On. The setting is Off by default.
If you don't have a Microsoft Customer Agreement, Microsoft Partner Agreement, or Enterprise Agreement, then you don't see the File Partitioning option.
Partitioning isn't currently supported for resource groups or management group scopes.
If you have existing exports and you want to set up file partitioning, create a new export. File partitioning is only available with the latest Exports version. There might be minor changes to some of the fields in the usage files that get created.
If you enable file partitioning on an existing export, you might see minor changes to the fields in file output. Any changes are due to updates that were made to Exports after you initially set yours up.
When file partitioning is enabled, you get a file for each partition of data in the export along with a _manifest.json file. The manifest contains a summary of the full dataset and information for each file partition in it. Each file partition has headers and contains only a subset of the full dataset. To handle the full dataset, you must ingest each partition of the export.
Here's a _manifest.json example manifest file.
{
"manifestVersion": "2021-01-01",
"dataFormat": "csv",
"blobCount": 1,
"byteCount": 160769,
"dataRowCount": 136,
"blobs": [
{
"blobName": "blobName.csv",
"byteCount": 160769,
"dataRowCount": 136,
"headerRowCount": 1,
"contentMD5": "md5Hash"
}
]
}
When you create a scheduled export in the Azure portal or with the API, it always runs on the exports version used at creation time. Azure keeps your previously created exports on the same version, unless you update it. Doing so prevents changes in the charges and to CSV fields if the export version is changed. As the export functionality changes over time, field names are sometimes changed and new fields are added.
If you want to use the latest data and fields available, we recommend that you create a new export in the Azure portal. To update an existing export to the latest version, update it in the Azure portal or with the latest Export API version. Updating an existing export might cause you to see minor differences in the fields and charges in files that are produced afterward.
You can easily verify that your Cost Management data is being collected and view the exported CSV file using Azure Storage Explorer.
In the export list, select the storage account name. On the storage account page, select Open in Explorer. If you see a confirmation box, select Yes to open the file in Azure Storage Explorer.
In Storage Explorer, navigate to the container that you want to open and select the folder corresponding to the current month. A list of CSV files is shown. Select one and then select Open.
The file opens with the program or application set to open CSV file extensions. Here's an example in Excel.
To download the CSV file, browse to the file in Microsoft Azure Storage Explorer and download it.
You can view the run history of your scheduled export by selecting an individual export in the exports list page. The exports list page also provides you with quick access to view the run time of your previous exports and the next time and export will run. Here's an example showing the run history.
Select an export to view the run history.
There are two runs per day for the first five days of each month after you create a daily export. One run executes and creates a file with the current month’s cost data. It's the run that's available for you to see in the run history. A second run also executes to create a file with all the costs from the prior month. The second run isn't currently visible in the run history. Azure executes the second run to ensure that your latest file for the past month contains all charges exactly as seen on your invoice. It runs because there are cases where latent usage and charges are included in the invoice up to 72 hours after the calendar month is closed. To learn more about Cost Management usage data updates, see Cost and usage data updates and retention.
Note
Daily export created between 1st to 5th of the current month would not generate data for the previous month as the export schedule starts from the date of creation.
One of the purposes of exporting your Cost Management data is to access the data from external systems. You might use a dashboard system or other financial system. Such systems vary widely so showing an example wouldn't be practical. However, you can get started with accessing your data from your applications at Introduction to Azure Storage.
Here are some frequently asked questions and answers about exports.
If you see garbled characters in Excel and you use an Asian-based language, such as Japanese or Chinese, you can resolve this issue with the following steps:
For new versions of Excel:
For older versions of MS Excel:
You might notice discrepancies between the aggregated cost from an exported file and the cost displayed in Cost Analysis. These differences can occur if the tool you use to read and aggregate the total cost truncates decimal values. This issue is common in tools like Power BI and Microsoft Excel.
Check if decimal places are being dropped when cost values are converted into integers. Losing decimal values can result in a loss of precision and misrepresentation of the aggregated cost.
To manually transform a column to a decimal number in Power BI, follow these steps:
When you open a .csv or .txt file, Excel might display a warning message if it detects that an automatic data conversion is about to occur. Select the Convert option when prompted to ensure numbers are stored as numbers and not as text. It ensures the correct aggregated total. For more information, see Control data conversions in Excel for Windows and Mac.
If the correct conversion isn't used, you get a green triangle with a Number Stored as Text
error. This error might result in incorrect aggregation of charges, leading to discrepancies with cost analysis.
In this tutorial, you learned how to:
Advance to the next tutorial to optimize and improve efficiency by identifying idle and underutilized resources.
Training
Module
Export data from Dataverse and use Microsoft Excel to edit records - Training
Discover how to export and edit Microsoft Dataverse table data using Excel files, while understanding security concepts.