我正在使用PowerBI分析来自Azure的成本数据。我通过以下方式建立直接连接并提取数据:打开PowerBI |获取数据在线服务| microsoft Azure消费见解(Beta),但是可以,但是,我只能看到两个月的数据,理想情况下,我希望看到6个。经过大量搜索,其他用户的普遍共识似乎是使用高级编辑器通过添加“ optionalParameters”并指定月份数来调整查询。我遇到了其他一些用户遇到相同问题但建议不起作用的站点。我希望这里有人可以指出正确的方向。
我将发布查询字符串,并在该字符串下方列出包含我已经尝试过的建议的URL。
let
enrollmentNumber = "xxxxxxx",optionalParameters = [ numberOfMonth = 6,dataType="DetailCharges" ],Source = microsoftAzureConsumptionInsights.Tables(enrollmentNumber,optionalParameters),usagedetails = Source{[Key="usagedetails"]}[Data],#"Parsed JSON" = Table.TransformColumns(usagedetails,{{"Tags",Json.Document}}),#"Expanded Tags" = Table.ExpandRecordColumn(#"Parsed JSON","Tags",{"environment","application","costCenter","owner"},{"Tags.environment","Tags.application","Tags.costCenter","Tags.owner"})
in
#"Expanded Tags"
https://community.powerbi.com/t5/Desktop/Azure-consumption-insights-get-more-than-two-month-usage-details/td-p/541413 https://community.powerbi.com/t5/Desktop/Power-BI-desktop-and-getting-multiple-months-in-one-row-from-the/td-p/50585 https://community.powerbi.com/t5/Desktop/Extend-the-Azure-consupmtion-data/td-p/444508 https://docs.microsoft.com/en-us/power-bi/desktop-connect-azure-consumption-insights