Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
sohail1432
Regular Visitor

Azure Cost Management App

I have pulled data feom Azure cost Management app into power BI desktop for 5 months. Now I want to modify it and want last 2 years data. How to do it.

1 REPLY 1
v-cgao-msft
Community Support
Community Support

Hi @sohail1432 ,

1. Consider creating a scheduled export of your Azure cost data to Azure Storage:
Tutorial - Create and manage exported data from Cost Management

2. If you want to import two years' worth of data at once, you can also query it multiple times and then merge it; you just need to make sure that you don't query more than three months' worth of data at a time:

let
    enrollmentNumber = "<<Enrollment Number>>",
	optionalParametersx = ... ,
	sourcex = ... ,
	riusagedetailsx = xxx ,
	...
	...
	...
    optionalParameters1 = [startBillingDataWindow = "-9", endBillingDataWindow = "-6"],
    source1 = AzureCostManagement.Tables("Enrollment Number", enrollmentNumber, 5, optionalParameters1),
    riusagedetails1 = source1{[Key="riusagedetails"]}[Data],
    optionalParameters2 = [startBillingDataWindow = "-6", endBillingDataWindow = "-3"],
    source2 = AzureCostManagement.Tables("Enrollment Number", enrollmentNumber, 5, optionalParameters2),    
    riusagedetails2 = source2{[Key="riusagedetails"]}[Data],
    riusagedetails = Table.Combine({riusagedetails1, riusagedetails2,...,riusagedetailsx})
in
    riusagedetails


Connect to Azure Cost Management data in Power BI Desktop. - Power BI | Microsoft Learn
Table.Combine - PowerQuery M | Microsoft Learn

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors