Plyql - error for non-aggregated derived measure (must have at most 1 reference)

I have a rather simple SELECT query that I am using plyql for:


atr/num_touches AS atr_per_touch

FROM ticket_level


__time >= “2017-06-28”

LIMIT 300;

However I am getting the following error:

Could not compute query due to error: must have at most 1 reference (has 2): $atr:NUMBER.divide($num_touches:NUMBER)

It doesn’t however have the same issue once I actually have a groupby type query. Any suggestions? Thanks!