Forum Discussion

Adeelaziz's avatar
Adeelaziz
Brass Contributor
Jan 17, 2025

Navigating Azure Retail Pricing Data in Power BI: My Journey


Recently, I embarked on integrating Azure Retail Pricing data into my Power BI Cost Management dashboard. Initially, this seemed daunting, but with the right orientation and assistance from Copilot, I successfully navigated through it.

Did you know? Microsoft offers a Retail Pricing API that allows you to import data into Power BI in your preferred currency. The first hurdle I encountered was the API’s paginated results. To overcome this, I created a function in Power BI that iterates through the paginated results using a base URL.

To my surprise, both the Retail Price table and the Azure Cost Management table had only one common column: meterID. This led to a many-to-many relationship, which is less than ideal as it introduces data ambiguity. Since there were multiple matching meterIDs with different retail prices, I addressed this by creating Measures. Additionally, I created another measure to calculate the retail cost, as the Retail Price table did not contain any consumption data.

Happy to share more details if anyone's interested.

#Azure #PowerBi #AzureCostManagement #AzureRetailPricing

3 Replies

  • Out of curiosity, what are you doing with this data?

    The FinOps toolkit offers Power BI reports that join cost and price data via Cost Management exports. This includes retail and discounted prices. The reports are only currently populating missing prices in the Cost Management data today, but I'd love to learn more about what you need to see if it's something we can support out of the box.

    • Adeelaziz's avatar
      Adeelaziz
      Brass Contributor

      Hey micflan ,

      Our approach was an attempt to streamline and be transparent with our chargeback costs. Estimates are done using the Azure Pricing Calculator, sometimes by the users themselves, but mostly with our Cloud team from the start. This way, they plan for and pay what they see, ensuring transparency for everyone. This removes the need to determine how much of our Azure discount is applied to each product, as we've learned it isn't evenly distributed across all resources.


      We also use Tags extensively within our environment for resource identification, lifecycle management, cost management, business logic, and for showback/chargeback. For the latter, we struggle with extending Reserved Instance (RI) savings back to projects/BUs, partly due to our architecture and heavy reliance on tagging. As you know, RIs can't be tagged. For this reason, we have shied away from purchasing RIs for project/BU resources.


      Right or wrong, I felt that using retail pricing for showback/chargeback struck the right balance for us.

  • luchete's avatar
    luchete
    Iron Contributor

    This is awesome! I liked how you tackled the challenges, especially the paginated results. The many-to-many relationship with the meterIDs sounds tricky, but your approach with creating Measures seems like a solid fix. Keep up the good work!

Resources