Azure Application Insight Analytics Pivot

Azure Application Insight Analytics Pivot,azure,azure-application-insights,ms-app-analytics,Azure,Azure Application Insights,Ms App Analytics,是否有一种方法可以在Azure Application insight分析查询中进行透视?SQL有一个类似的功能,可以在中实现吗 当我运行下面的查询时,我会得到异常和计数,但我希望看到逐日趋势 exceptions | where timestamp >= ago(24h) | extend Api = replace(@"/(\d+)",@"/xxxx", operation_Name) | summarize count() by type | sort by count_ des

是否有一种方法可以在Azure Application insight分析查询中进行透视?SQL有一个类似的功能,可以在中实现吗

当我运行下面的查询时,我会得到异常和计数,但我希望看到逐日趋势

exceptions 
| where timestamp >= ago(24h) 
| extend Api = replace(@"/(\d+)",@"/xxxx", operation_Name)
| summarize count() by type
| sort by count_ desc 
| limit 10
| project Exception = type, Count = count_ 

我在找一些不适合白天的东西

实现类似您所需的目标的最简单方法是使用:

exceptions
| where timestamp >= ago(7d)
| summarize count() by type, bin(timestamp, 1d) 
这将为每天每种类型的输出提供一行。不完全是您想要的,但在graph中呈现时会很好看(将为每种类型提供一行)

要获得与您在示例中输入的表相似的表将更加困难,但此查询应该可以做到:

exceptions 
| where timestamp >= startofday(ago(3d)) 
| extend Api = replace(@"/(\d+)",@"/xxxx", operation_Name)
| summarize count() by type, bin(timestamp, 1d)
| summarize 
    Today = sumif(count_, timestamp == startofday(now())),
    Today_1 = sumif(count_, timestamp == startofday(ago(1d))),
    Today_2 = sumif(count_, timestamp == startofday(ago(2d))),
    Today_3 = sumif(count_, timestamp == startofday(ago(3d)))
    by type

你能解释一下你想要达到的目标吗?在AnalyticsHanks@EranG中可能有不同的方法来实现这一点。我添加了更多信息。这不是我想要的,我需要构建一个HTML来发送邮件,但无法使用图表。是否有其他方法将行转换为列,任何指针或指导都会有帮助?我编辑了我的答案,以得到您想要的结果