makeTimeSeries

Hi, trying to use makeTimeSeries but it doesn’t seem to allow the success field I added below

fetch bizevents
| filter eventType == “my-event”

| makeTimeseries {
       started = countDistinct(if(pathname == “/started”, clientIPAddress), default: 0),
       completed= countDistinct(if(pathname == “/completed”, clientIPAddress), default: 0)

success = (completed/started) * 100}
| fieldsRemove started, completed

Hello,
In order to create a new field that charts completed/started over time, you’ll need to divide each value of completed by the corresponding value in started, which can be done using iCollectArray.

fetch bizevents<br>| filter eventType == "my-event"<br>| makeTimeseries {<br>       started = countDistinct(if(pathname == "/started", clientIPAddress), default: 0),<br>       completed= countDistinct(if(pathname == "/completed", clientIPAddress), default: 0)<br> }<br><strong>| fieldsAdd success = iCollectArray(completed[]/started[])</strong><br>| fieldsRemove started, completed