Forum Discussion
Anonymous
8 years agoNot applicable
Extend the Azure consupmtion data.
Hi, I am pretty new to Power BI and need some help on extending the time that Power BI keeps the data it collects, specifically from the Azure consuption API. I have read the article published be...
Anonymous
8 years agoNot applicable
HI Anonymous,
You can try to use below formula, I try to merge my formula with yours.
let
enrollmentNumber = "100",
optionalParameters = [ numberOfMonth = 6, dataType="DetailCharges"],
Source = MicrosoftAzureConsumptionInsights.Tables(enrollmentNumber , 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}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Week", each if Date.IsInCurrentWeek([Date]) then "This Week" else Text.From(Date.EndOfWeek([Date])))
in
#"Added Custom"
Regards,
Xiaoxin Sheng
Anonymous
8 years agoNot applicable
Thanks, I have pasted it in to Power BI and it didn't break anything, I will have to wait till next month to see if it keeps the extra data, but I do believe it will. i will of course come back and comment here to close it of.