【发布时间】:2021-04-29 02:50:38
【问题描述】:
我正在开展项目,目标是将荷兰的多家银行连接到我们的平台。
目前,每次用户连接到一家银行时,我们都希望发送一个指标并将其显示在 Azure 仪表板中。 我们快到了,除了我们想汇总每天的总和。这就是我们现在所拥有的:
例如,看看荷兰银行,我们有:
- ABN AMRO 在 25/01/2021 有 2081 个连接
- ABN AMRO 在 2021 年 1 月 24 日有 2325 个连接
- ABN AMRO 在 23/31/2021 有 5082 个连接
但我们想要的是这样总结:
- ABN AMRO 在 25/01/2021 有 2081 + 2325 + 5082 = 9488
- ABN AMRO 在 2021 年 1 月 24 日有 2325 + 5082 = 7407
- ABN AMRO 在 2021 年 23 月 31 日有 5082 = 5082
这是目前使用的查询:
customMetrics
| where name == "CustomerGrantedConsent"
| extend BankName = customDimensions.BankName
| summarize Count = count() by tostring(BankName), bin(timestamp, 1d)
| order by timestamp
怎么做?
【问题讨论】:
-
这不行吗?只需在最后两行之间添加
| summarize sum(CC) as total_by_bank_time by TT, BB(| summarize CC = count() by tostring(BankName) as BB, bin(timestamp, 1d) as TT和| order by timestamp)
标签: azure azure-devops azure-functions kql