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
Anonymous
Not applicable

AZURE CONSUMPTION INSIGHTS - PRICESHEET

Hello, 

 

I am using AZURE CONSUMPTION INSIGHTS connector  but i can´t get all pricesheets from previous months. I am only available to get current month pricesheet. For Details i don´t have this issue. 

 

 

With that code i can get previous months but only cost, not quantity included or any ID (MeterId or Id) 

let
Source = AzureEnterprise.Tables("https://ea.azure.com/rest/Enrollment Number"),
Detail = Source{[Key="PriceSheet"]}[Data],
#"Expanded Data" = Table.ExpandTableColumn(Detail, "Data", {"Service", "Unit of Measure", "Part Number", "Unit Price", "Currency Code", ""}, {"Data.Service", "Data.Unit of Measure", "Data.Part Number", "Data.Unit Price", "Data.Currency Code", "Data."})
in
#"Expanded Data"


Any clue about what i am missing? 

Thank you! 

1 ACCEPTED SOLUTION

@Anonymous,

You should get data of previous months at a time when you change datatype  to DetailCharges or Summaries, right?

I guess that the custom query can only return data of one month for PriceSheet, you may need to use merge queries feature to workaround this issue.


Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
v-yuezhe-msft
Employee
Employee

@Anonymous,

According to this article, the Summary and *PriceSheet tables are only available for the enrollment-level API Key, also, the data in these tables has, by default, the current month's data for Usage and PriceSheet.

How about you use custom queries to retrieve data described in the above article?

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hello Lydia, 

 

Thanks for your answer. My problem in fact is that i only can get one month: 
let
enrollmentNumber = "Enrollment Nº",
optionalParameters = [ dataType = "PriceSheet", numberOfMonth = 10 ],
result = MicrosoftAzureConsumptionInsights.Contents(enrollmentNumber, optionalParameters)
in
result

 

I can change the month:


let
enrollmentNumber = "Enrollment Nº",
optionalParameters = [ startBillingDataWindow = "-12", endBillingDataWindow = "-3", dataType = "PriceSheet" ],
result = MicrosoftAzureConsumptionInsights.Contents(enrollmentNumber, optionalParameters)
in
result

 

But i only will get the "-3" Not all previous months. I don´t have this problem with Detail and i want to link them. 

 

One option could be create multiple queries and merge them, but i think that should exist a better option. 

 

Best regards, 

@Anonymous,

You should get data of previous months at a time when you change datatype  to DetailCharges or Summaries, right?

I guess that the custom query can only return data of one month for PriceSheet, you may need to use merge queries feature to workaround this issue.


Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-yuezhe-msft I would like to report an issue, there is no way to retrieve previous month, you only can get current month or the month before previous month. 

 


Current Month: 
let
enrollmentNumber = "EnrollmentNº",
optionalParameters = [ startBillingDataWindow = "-1", endBillingDataWindow = "0", dataType = "PriceSheet" ],
result = MicrosoftAzureConsumptionInsights.Contents(enrollmentNumber, optionalParameters)
in
result

 

Month before previous Month: 
let 
enrollmentNumber = "EnrollmentNº",
optionalParameters = [ startBillingDataWindow = "-2", endBillingDataWindow = "-1", dataType = "PriceSheet" ],
result = MicrosoftAzureConsumptionInsights.Contents(enrollmentNumber, optionalParameters)
in 
result


So, i have a jump in my data. 

This is still not good.

 

So at start of every month, do I need to change this data ?   If so, thats not a good solution. 

startBillingDataWindow = "-2", endBillingDataWindow = "-1" 

 

Between, didi any one observed how long it is taking time to load data with this new connector?

http://community.powerbi.com/t5/Desktop/Microsoft-Azure-Consumption-Insights-with-Power-BI-Issues/td...

Anonymous
Not applicable

I was looking for any other answer... 😞 I knew that. Thanks in anywaySmiley Happy

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