azure-application-insights - Application Insights 聚合事件发生的总和
问题描述
我UserRegistered
在应用洞察中记录了一个事件,以便我可以看到哪些用户在注册后做了正确的事情。我想使用这个事件来显示一段时间内注册的用户总数。
我目前有这个查询:
customEvents
| where timestamp >= datetime(2021-06-04T16:08:10.602Z) and timestamp < datetime(2021-06-11T16:08:10.602Z)
| summarize ['customEvents/count_sum'] = sum(itemCount) by bin(timestamp, 1d)
| order by timestamp desc
然而,这只给了我每个垃圾箱的总数。因此,如果用户在第 1 天和第 3 天注册,我会看到如下内容:
|
| |
1 2 3
但是,我希望看到随着时间的推移而增长,因此这些箱需要汇总它们的总和,给我这个:
|
|
| | |
1 2 3
我可以在 App Insights 中实现这一点吗?
解决方案
试试这个 ?
customEvents
| where timestamp >= datetime(2021-06-04T16:08:10.602Z) and timestamp < datetime(2021-06-11T16:08:10.602Z)
| summarize ['customEvents/count_sum'] = sum(itemCount) by bin(timestamp, 1d)
| order by timestamp desc
| extend total=row_cumsum(['customEvents/count_sum'])
推荐阅读
- excel - 如果范围包含合并单元格,则第一个单元格的查找方法失败
- r - 如何删除前导和结束分号和空格
- google-oauth - 仅对 Google Drive 使用 Blazor OIDC 身份验证和 Google OAuth
- list - 如何在列表中选定的单个按钮上加边框
- time-series - 在 AWS Timestream 中重放事件并摄取它们
- python - 模型输出没有去量化。张量流 2.4.1
- javascript - Chartjs:双x轴没有相同的网格线
- python - 如何重新索引两个熊猫数据框中的列,以使它们都具有相同的列?
- next.js - 用 Next.js 构建 module.scss 到 css 的问题
- azure - Grafana for K8S - 配置仪表板访问权限