powerbi - 导入 PowerBI 的 Application Insights Data Limited

标签 powerbi azure-application-insights m

我正在尝试将数据从 Azure Application Insights 导入 PowerBI。问题是,不管 timespan我设置,我似乎只提取了大约一周的数据。下面是 M 查询的样子:

let AnalyticsQuery =
let Source = Json.Document(Web.Contents("https://api.applicationinsights.io/v1/apps/<uuid>/query", 
[Query=[#"query"="customEvents
| project customDimensions
",#"x-ms-app"="AAPBI",#"timespan"="P30D"],Timeout=#duration(0,0,60,0)])),
TypeMap = #table(
{ "AnalyticsTypes", "Type" }, 
{ 
{ "string",   Text.Type },
{ "int",      Int32.Type },
{ "long",     Int64.Type },
{ "real",     Double.Type },
{ "timespan", Duration.Type },
{ "datetime", DateTimeZone.Type },
{ "bool",     Logical.Type },
{ "guid",     Text.Type },
{ "dynamic",  Text.Type }
}),
DataTable = Source[tables]{0},
Columns = Table.FromRecords(DataTable[columns]),
ColumnsWithType = Table.Join(Columns, {"type"}, TypeMap , {"AnalyticsTypes"}),
Rows = Table.FromRows(DataTable[rows], Columns[name]), 
Table = Table.TransformColumnTypes(Rows, Table.ToList(ColumnsWithType, (c) => { c{0}, c{3}}))
in
Table
in
    AnalyticsQuery

我认为这是一个大小问题,但我已经将其缩小到一列(尽管很宽),但它仍然没有返回更多数据。

将返回的数据集缩小到两列已将数据集增加到包括几周而不是不到一周,但我仍在寻找更大的数据集。这是最新的查询:
let AnalyticsQuery =
let Source = Json.Document(Web.Contents("https://api.applicationinsights.io/v1/apps/<uuid>/query", 
[Query=[#"query"="customEvents
| extend d=parse_json(customDimensions)
| project timestamp, d[""Properties""]
| order by timestamp desc
| where timestamp <= now() and d_Properties <> """"
",#"x-ms-app"="AAPBI"],Timeout=#duration(0,0,4,0)])),
TypeMap = #table(
{ "AnalyticsTypes", "Type" }, 
{ 
{ "string",   Text.Type },
{ "int",      Int32.Type },
{ "long",     Int64.Type },
{ "real",     Double.Type },
{ "timespan", Duration.Type },
{ "datetime", DateTimeZone.Type },
{ "bool",     Logical.Type },
{ "guid",     Text.Type },
{ "dynamic",  Text.Type }
}),
DataTable = Source[tables]{0},
Columns = Table.FromRecords(DataTable[columns]),
ColumnsWithType = Table.Join(Columns, {"type"}, TypeMap , {"AnalyticsTypes"}),
Rows = Table.FromRows(DataTable[rows], Columns[name]), 
Table = Table.TransformColumnTypes(Rows, Table.ToList(ColumnsWithType, (c) => { c{0}, c{3}}))
in
Table,
    #"Sorted Rows" = Table.Sort(AnalyticsQuery,{{"timestamp", Order.Ascending}})
in
    #"Sorted Rows"

最佳答案

您应该查看表缓冲或直接查询:see this discussion

关于powerbi - 导入 PowerBI 的 Application Insights Data Limited,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57342319/

相关文章:

json - 如何在 Power BI 中记录报表可视化效果?

azure - 应用程序见解 Java 代理 : Which Certificates to add to truststore?

azure - 如何从应用程序洞察中删除前门运行状况探测

excel - Power Query -> 将逗号转换为句点并获取十进制数

excel - Power Query - 基于两个筛选器的组

dynamics-crm - 从 Dynamics 365 获取审计记录详细信息到 Power BI

excel - PowerQuery:如何连接分组值?

excel - 如何计算 Excel PowerQuery 中不包括当前个人的日期与组内平均值的偏差?

powerbi - 从 Power BI 报告卡视觉对象复制文本

azure - Application Insights 中的用户流和 channel 功能之间的差异