Using Power BI to Analyse Azure Costs

Azure Cost Management is in constant evolution to help manage the cost of services in the cloud.

Microsoft provides the Azure Cost Management Power BI App to manage cloud costs, but this app only works with Enterprise Agreement accounts.

This was a considerable limitation, since many companies use the cloud using Customer Agreement instead of Enterprise Agreement.

Connecting Power BI to Azure Cost Manager

Recently, Microsoft updated the Azure Cost Manager connector in Power BI to support other connections besides Enterprise Agreement. This change opened a great opportunity to Azure users to build their own cost analysis app.

The image below shows the connection window in Power BI.

It’s important to know the three kinds of connection allowed to Azure Cost Management:

  • Customer Agreement: The most common account used by small business
  • Enterprise Agreement: Accounts used by big enterprises. The App provided by Microsoft can make this connection, so you will only need a custom connection if you miss some feature on the app.
  • Billing Profile: A billing profile is like a subset of a Customer Agreement. You can organize this subset according many different rules, such as department, branch and more.

On the connection window, the available options can be used for these three kinds of connection:

  • Enrollment Number: Enterprise Agreement. On the Scope Identifier textbox, fill the account number.
  • Billing Profile: As the name explains, billing profile. On the Scope Identifier textbox, fill the billing profile number
  • Manually Input Scope: This option is used for a Customer Agreement. You need to follow the example format and use the billing account number in the format. Example: /providers/Microsoft.Billing/billingAccounts/{billingAccountId}

Identifying the Id

You need to access the Azure Portal to identify the Id of the account, either a Customer Agreement or an Enterprise Agreement.

It’s important to notice you need to access Cost Management + Billing on the main Azure Portal menu. There is a Cost Management option that many people use inside a subscription, but only the menu option will give you access to the account Id.

Once inside Cost Management + Billing, you will find the Id inside Properties menu item

For the Billing Profile Id, you need to look at the Properties menu item inside the Billing Profile

After the Connection

After the connection is established, you will have the entire set of Azure Cost Management tables to work with:

References