cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nbcturley
Frequent Visitor

Azure Consumption Insights | Get three months of data

Hi Everyone,

I have tried all of the suggestions from this community; perhaps I am overlooking a detail.

 

The situation: 

- Using Power BI desktop 2.71.5523.821 64-bit (July 2019)

- Connection through Azure Consumption Insights

- Fetching data from MicrosoftAzureConsumptionInsights.Tables

 

Also tried:

- Clearing cache

- Rebooting machine

- Every combination of the below query (except the correct one)

 

The query (enrollment id redacted)

let
optionalParameters = [numberOfMonth = 4, dataType="DetailCharges"],
Source = MicrosoftAzureConsumptionInsights.Tables(xxxxx, optionalParameters ),
usagedetails = Source{[Key="usagedetails"]}[Data],
#"Changed Type" = Table.TransformColumnTypes(usagedetails,{{"AccountOwnerId", type text}, {"Account Name", type text}, {"ServiceAdministratorId", type text}, {"SubscriptionId", Int64.Type}, {"SubscriptionGuid", type text}, {"Subscription Name", type text}, {"Month", type date}, {"Day", Int64.Type}, {"Year", Int64.Type}, {"Product", type text}, {"Meter ID", type text}, {"Meter Category", type text}, {"Meter Sub-Category", type text}, {"Meter Region", type text}, {"Meter Name", type text}, {"Resource Location", type text}, {"Consumed Service", type text}, {"Instance ID", type text}, {"ServiceInfo1", type text}, {"ServiceInfo2", type text}, {"AdditionalInfo", type text}, {"Tags", type text}, {"Store Service Identifier", type text}, {"Department Name", type text}, {"Cost Center", type text}, {"Unit Of Measure", type text}, {"Resource Group", type text}, {"Location", type text}, {"InstanceId", type text}, {"AccountId", Int64.Type}, {"DepartmentId", Int64.Type}, {"ProductId", Int64.Type}}),
#"Filtered Rows" = Table.SelectRows(#"Changed Type", each true)
in
#"Filtered Rows"

 

Can anyone tell me what I am missing/doing wrong?

1 ACCEPTED SOLUTION

Accepted Solutions
nbcturley
Frequent Visitor

Re: Azure Consumption Insights | Get three months of data

Hello - I have some information on this topic; thanks for the help Microsoft Business Intelligence. First off, I was not able to get the above query to import anything but the default numberOfMonth. The reason, according to the Microsoft Team, is because I used the Azure Consumption Insights Connector (Beta) from Power BI Desktop. This would be contrary to the recommended method of connecting to Azure through the Power BI Service. Sooooooo.

 

Microsoft gave me a Power BI Template file that imported the numberOfMonth correctly. Here is what I did to make MY Power BI Desktop file import numberOfMonth correctly:

1. Modified MY "Usage Details" query to the following:

2. = MicrosoftAzureConsumptionInsights.Contents(0, [ dataType = "DetailCharges", numberOfMonth = NumberOfMonth, enrollmentNumber = EnrollmentNumber ])

3. Create two parameters: NumberOfMonth and EnrollmentNumber

4. Refreshed the table

 

View solution in original post

2 REPLIES 2
Community Support
Community Support

Re: Azure Consumption Insights | Get three months of data

Hi @nbcturley 

 

Sorry, I can't replicate your issue, please kindly raise it to support team for better advice:

https://powerbi.microsoft.com/en-us/support/

Support Ticket.gif

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
nbcturley
Frequent Visitor

Re: Azure Consumption Insights | Get three months of data

Hello - I have some information on this topic; thanks for the help Microsoft Business Intelligence. First off, I was not able to get the above query to import anything but the default numberOfMonth. The reason, according to the Microsoft Team, is because I used the Azure Consumption Insights Connector (Beta) from Power BI Desktop. This would be contrary to the recommended method of connecting to Azure through the Power BI Service. Sooooooo.

 

Microsoft gave me a Power BI Template file that imported the numberOfMonth correctly. Here is what I did to make MY Power BI Desktop file import numberOfMonth correctly:

1. Modified MY "Usage Details" query to the following:

2. = MicrosoftAzureConsumptionInsights.Contents(0, [ dataType = "DetailCharges", numberOfMonth = NumberOfMonth, enrollmentNumber = EnrollmentNumber ])

3. Create two parameters: NumberOfMonth and EnrollmentNumber

4. Refreshed the table

 

View solution in original post

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors