Cloud cost management, a component of FinOps, presents a complex challenging exercise. Azure, being a public cloud, hosts diverse workloads across different service tiers and regions, making cost management a difficult task.
In this article, I will demonstrate how I developed a Power BI dashboard to delve into and analyze the costs associated with my usage
There are several methods to access usage and associated costs. While utilizing the Azure cost management API is one approach, for this article, I will opt for the monthly usage file, which offers a more convenient solution.
As the first step we need to navigate to the subscription and navigate to the invoices section.
Afterward, proceed to the 'More Options' section and download the usage file in CSV format for a designated billing period.
Next, upload the CSV file to your Power BI environment. Once uploaded, you'll be able to view the schema in the data pane.
Let's begin creating our dashboard. Firstly, we'll analyze the cost of each resource type. To do this, drag the 'Cost' and 'MeterCategory' columns onto the canvas. Then, convert the visualization to a Pie Chart.
Now, let's proceed to our second visualization. This visualization will enable us to analyze the cost of each service based on the plan or tier. To achieve this, we will create a table displaying the 'Cost', 'MeterSubCategory', and 'MeterName'.
We've already gained some valuable insights! However, let's continue to delve deeper. We can examine the daily costs for specific resources. To do this, add another table displaying 'Cost', 'Date', and 'MeterName' as indicated below.
Moving on to our final chart, let's visualize the usage pattern for specific services over time. To accomplish this, we'll create a line chart incorporating the 'Cost', 'Date', and 'MeterName' fields.
Now, let's enhance the visual appeal by adding titles and formatting
Let's analyze a specific resource. If I want to analyze my costs and usage specifically on Cognitive Services, I can select that service from the first chart (Cost by Resource Type), and the other charts will filter accordingly.
I noticed that I've spent more on GPT4 prompt tokens. To analyze further, I can navigate to my second chart (Cost by Resource Plan/Tier) and click on the relevant item.
This process helps me identify cost patterns and gain a better understanding of how Azure costing operates.