0
votes

I'm trying to calculate wait times in google sheets by subtracting the time an interaction began with the time a customer requested service then provide an average.

I'm using the google sheets query language to accomplish aggregating/pivots ETC.

Google sheets will let me average both numbers and subtract them from each other but that's obviously not what I need.

Code in question is Avg(Col6-Col14) which provides an error of

Unable to parse query string for Function QUERY parameter 2: PARSE_ERROR: Encountered " "-" "- "" at line 1, column 23. Was expecting: ")"

It will, however, let me do Avg(Col6)-Avg(Col14). Is there some way around this limitation I'm not aware of?

1
I also tried "Avg(Sum(Col6)-Sum(Col14))" and get Unable to parse query string for Function QUERY parameter 2: PARSE_ERROR: Encountered " "(" "( "" at line 1, column 22. Was expecting: ")" ...Richard Jones

1 Answers

0
votes

maybe try:

=AVERAGE(IFERROR(QUERY({A:Z}, "select Col6-Col14 label Col6-Col14''", 0)))