Set relative time via absolute time specification


I am relatively new to grafana and I find myself hard-code the relative time specifications
for several graphs and thus wondering:

Is it possible to use a variable to set the ‘Relative time’ in the query specification
(which default to 1h) to the same history as set in From in Absolute time range? For
instance assume that we have absolute time range set to:

From: now-30d
To: now

Then I would like to specify the ‘Relative time’ such that it in this case would be set
to 30d.

Now assume that the absolute range is adjusted to:

From: now-120d
To: now

In that case I would like the ‘Relative time’ to be adjusted to such that it would become

Is there a build-in variable that I can use for this purpose (and does the relative time
specification allow for variables in the first place) or is there another approach that
could be use to suit this purpose. And yes it’s fine to assume that my cases here are constrained to

From: now-Nd
To: now

And I wish to set relative time to follow the From specification such that it is automatically set to Nd when From is changed to ‘now-Nd’.

Thanks in advance.

Hi, did you find any solution?