Sort 'sdiff' results
I'm trying to figure out how to calculate the elapsed time between two data points in a record and then sort the results into different buckets. We use an embedded version of Sisense so I can't edit anything via the 'Elasticube'.
I'm trying to take all the records created by a person and calculate the time from when the record was created to the time it was completed. Then display how many records were completed within different time frames. Either by using a column chart or pivot table. The problem is that the 'sdiff' function requires an aggregation. I don't want to find the median or average, I want to calculate the time for every record.
I tried slapping an 'ALL' in front of the 'sdiff' function but that gave me an error.
I also tried (COUNT(RECORDS),(SDIFF(ENDTIME, STARTTIME))) in the hopes that I could then filter the results but get an unexpected token error.
I also tried CASE WHEN (SDIFF(ENDTIME,STARTTIME) < 7200 THEN 1 ELSE 0 END but ran into the same problem of 'sdiff' requiring an aggregator.
What do?