Forum Discussion
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!
- Anonymous8 years ago
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
6 Replies
- AnonymousNot applicable
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- AnonymousNot 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
resultI can change the month:
let
enrollmentNumber = "Enrollment Nº",
optionalParameters = [ startBillingDataWindow = "-12", endBillingDataWindow = "-3", dataType = "PriceSheet" ],
result = MicrosoftAzureConsumptionInsights.Contents(enrollmentNumber, optionalParameters)
in
resultBut 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,
- AnonymousNot applicable
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