I'm in working on project with goal of connecting multiple banks, in Netherlands, into our platform.
For now, every time a user connects to a single bank, we want to send out a metric and show it in Azure dashboard. We are almost there, except that we want to aggregate the sum per day. This is what we have right now:
For example, looking at ABN AMRO, we have:
- ABN AMRO had 2081 connections on 25/01/2021
- ABN AMRO had 2325 connections on 24/01/2021
- ABN AMRO had 5082 connections on 23/31/2021
But what we want is to sum it like this:
- ABN AMRO had 2081 + 2325 + 5082 on 25/01/2021 = 9488
- ABN AMRO had 2325 + 5082 on 24/01/2021 = 7407
- ABN AMRO had 5082 on 23/31/2021 = 5082
This is the query used so far:
customMetrics
| where name == "CustomerGrantedConsent"
| extend BankName = customDimensions.BankName
| summarize Count = count() by tostring(BankName), bin(timestamp, 1d)
| order by timestamp
How?
| summarize sum(CC) as total_by_bank_time by TT, BB
between last two lines (| summarize CC = count() by tostring(BankName) as BB, bin(timestamp, 1d) as TT
and| order by timestamp
) – Kashyap