Kusto/Azure Application Insights - 如何将数据与前几周的同一天进行比较?

Kusto / Azure Application Insights - How to compare data against same day of previous weeks?

如何使用 Kusto(应用程序洞察、日志分析、Azure 监视器)将当天(例如:星期一)的数据与之前所有类似日期的数据进行比较?

a.k.a,如何只比较当前星期一和之前的星期一?

requests
| where timestamp > ago(90d)
| where dayofweek(timestamp) == dayofweek(now())
| summarize count() by bin(todatetime(strcat("20210101 ", format_datetime(timestamp,"HH:mm:ss"))),5m),tostring(week_of_year(timestamp))
| render timechart

诀窍是使用相同的日期对时间戳进行分组,保留时间部分和 week_of_year(必须转换为字符串,否则它将被解释为另一个数值)