{"id":92132,"date":"2021-09-06T17:00:54","date_gmt":"2021-09-06T17:00:54","guid":{"rendered":"https:\/\/www.red-gate.com\/simple-talk\/?p=92132"},"modified":"2024-09-03T20:15:20","modified_gmt":"2024-09-03T20:15:20","slug":"using-power-bi-to-analyse-azure-costs","status":"publish","type":"post","link":"https:\/\/www.red-gate.com\/simple-talk\/blogs\/using-power-bi-to-analyse-azure-costs\/","title":{"rendered":"Using Power BI to Analyse Azure Costs"},"content":{"rendered":"<p><strong>Azure Cost Management<\/strong> is in constant evolution to help manage the cost of services in the cloud.<\/p>\n<p>Microsoft provides the <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/cost-management-billing\/costs\/analyze-cost-data-azure-cost-management-power-bi-template-app?WT.mc_id=DP-MVP-4014132\"><strong>Azure Cost Management Power BI App<\/strong><\/a> to manage cloud costs, but this app only works with <strong>Enterprise Agreement<\/strong> accounts.<\/p>\n<p>This was a considerable limitation, since many companies use the cloud using <strong>Customer Agreement<\/strong> instead of <strong>Enterprise Agreement<\/strong>.<\/p>\n<h2>Connecting Power BI to Azure Cost Manager<\/h2>\n<p>Recently, Microsoft updated the\u00a0<strong>Azure Cost Manager<\/strong> connector in <strong>Power BI\u00a0<\/strong>to support other connections besides <strong>Enterprise Agreement<\/strong>. This change opened a great opportunity to Azure users to build their own cost analysis app.<\/p>\n<p>The image below shows the connection window in <strong>Power BI<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-92133\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2021\/08\/PBICost1.png\" alt=\"\" width=\"877\" height=\"348\" \/><\/p>\n<p>\nIt&#8217;s important to know the three kinds of connection allowed to <strong>Azure Cost Management<\/strong>:<\/p>\n<ul>\n<li><strong>Customer Agreement:<\/strong> The most common account used by small business<\/li>\n<li><strong>Enterprise Agreement:<\/strong> 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.<\/li>\n<li><strong>Billing Profile:<\/strong> 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.<\/li>\n<\/ul>\n<p>\nOn the connection window, the available options can be used for these three kinds of connection:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-92134\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2021\/08\/PBICost2.png\" alt=\"\" width=\"397\" height=\"256\" \/><\/p>\n<ul>\n<li><strong>Enrollment Number:<\/strong> Enterprise Agreement. On the <em>Scope Identifier<\/em> textbox, fill the account number.<\/li>\n<li><strong>Billing Profile:<\/strong> As the name explains, billing profile. On the <em>Scope Identifier<\/em> textbox, fill the billing profile number<\/li>\n<li><strong>Manually Input Scope:<\/strong> 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:\u00a0<em>\/providers\/Microsoft.Billing\/billingAccounts\/{billingAccountId}<\/em><\/li>\n<\/ul>\n<h2>Identifying the Id<\/h2>\n<p>You need to access the <strong>Azure Portal<\/strong> to identify the Id of the account, either a <strong>Customer Agreement<\/strong> or an <strong>Enterprise Agreement<\/strong>.<\/p>\n<p>It&#8217;s important to notice you need to access <strong>Cost Management + Billing<\/strong> on the main <strong>Azure Portal<\/strong> menu. There is a <strong>Cost Management<\/strong> option that many people use inside a subscription, but only the menu option will give you access to the account Id.<\/p>\n<p>Once inside <strong>Cost Management + Billing<\/strong>, you will find the Id inside <strong>Properties<\/strong> menu item<\/p>\n<p>For the <strong>Billing Profile<\/strong> Id, you need to look at the <strong>Properties<\/strong> menu item inside the <strong>Billing Profile<\/strong><\/p>\n<h2>After the Connection<\/h2>\n<p>After the connection is established, you will have the entire set of <strong>Azure Cost Management<\/strong> tables to work with:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-92135\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2021\/08\/PBICost3.png\" alt=\"\" width=\"495\" height=\"661\" \/><\/p>\n<h2>\nReferences<\/h2>\n<ul>\n<li><strong>Cost Management Connector in Power BI<\/strong>: <a href=\"https:\/\/docs.microsoft.com\/en-us\/power-bi\/connect-data\/desktop-connect-azure-cost-management?WT.mc_id=DP-MVP-4014132\">https:\/\/docs.microsoft.com\/en-us\/power-bi\/connect-data\/desktop-connect-azure-cost-management<\/a><\/li>\n<li><strong>Organizing Accounts using Billing Profiles<\/strong>: <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/cost-management-billing\/manage\/mca-section-invoice?WT.mc_id=DP-MVP-4014132\">https:\/\/docs.microsoft.com\/en-us\/azure\/cost-management-billing\/manage\/mca-section-invoice<\/a><\/li>\n<li><strong>Cost Management Power BI App<\/strong>:\u00a0<a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/cost-management-billing\/costs\/analyze-cost-data-azure-cost-management-power-bi-template-app?WT.mc_id=DP-MVP-4014132\">https:\/\/docs.microsoft.com\/en-us\/azure\/cost-management-billing\/costs\/analyze-cost-data-azure-cost-management-power-bi-template-app<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>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&#8230;&hellip;<\/p>\n","protected":false},"author":50808,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[2,159166],"tags":[5364,5336,145450,101611],"coauthors":[6810],"class_list":["post-92132","post","type-post","status-publish","format-standard","hentry","category-blogs","category-powerbi","tag-azure","tag-cloud","tag-cost-management","tag-power-bi"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/92132","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/users\/50808"}],"replies":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/comments?post=92132"}],"version-history":[{"count":2,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/92132\/revisions"}],"predecessor-version":[{"id":92137,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/92132\/revisions\/92137"}],"wp:attachment":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media?parent=92132"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/categories?post=92132"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/tags?post=92132"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/coauthors?post=92132"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}