How create moving average of transformed field?

In a Time Series panel I have one line graph showing the field hourly_rate.

It’s a bit jumpy, so I would like to add a second line showing Moving Average of hourly_rate. It would be smoother since we want to focus on the long-term trend, not fluctuations during the day.

I have created hourly_rate in a few steps in Transform tab. From that field, how would I create a Moving Average field (say using mean() and a window of 10), in Transform?

Query is on the raw data, before Transform:

SELECT “duration”, “count” FROM “foo_downloads” WHERE time >= now() - 6h and time <= now() GROUP BY “bar_ver”


Data source is InfluxDB
Grafana v 9.3.1
Chromium browser in Ubuntu 20