How to use offset in flux downsampling

In my downsampling job I want to use offset that is take data from interval now() -11m, now() - 1m, but adding two durations does not work. How can I achieve that?

option task = {name: "Downsampling", every: 10m, offset: 1m}

data = from(bucket: "my_bucket")
	|> range(start: -(task.every + task.offset), stop: -task.offset)
	... rest of the query

Hello @Mikolaj_G,
The offset delays the execution of the task but preserves the original time range.

I wouldn’t necessarily use the task options you can also do:

option task = {name: "Downsampling", every: 10m, offset: 1m}

data = from(bucket: "my_bucket")
	|> range(start: -11m, stop: -1m) 
	... rest of the query