Dear community,
i have data which i have saved in the following pastebin as example:
https://pastebin.com/GUseDaTF
I want to make a graph the number of calls in the time period.
As you see the calls are recorded every minute and therefore the call id (DestinationAlias) occurs multiple times.
I would like to chart it with windowperiod or something like that.
There is my code with what i came up for now:
import "strings"
from(bucket: "CMSData")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "expressway_calls")
|> filter(fn: (r) => r["_field"] == "DestinationAlias")
|> filter(fn:(r) => strings.hasSuffix(v: r["_value"], suffix: "company@m.webex.com" ))
|> window(every: 5m)
|> unique()
|> count()
I would like to have an output like the following:
| _start | _stop | NumberOfCalls |
|----------------------|----------------------|---------------|
| 2022-01-19T11:05:00Z | 2022-01-19T11:10:00Z | 4 |
| 2022-01-19T11:10:00Z | 2022-01-19T11:15:00Z | 7 |
| | | 9 |
Could somebody point me in the right direction?
Thank you in advance!