Option to have a dynamic AQL relative_period time interval

I’m using the relative_period time interval to calculate some metrics, and one thing that I think could be pretty useful is to allow the visualization to set the time interval. What I mean is instead of hard coding the interval like this:
relative_period(table.cost, table.date, interval(-1 month))
It would be great if we could make the interval period (month in this case) be applied by the period setting we have in the visualization. At the moment we have metrics that are used monthly and quarterly, and they are pretty simple aggregations, but I’m having to build separate metrics for each.

Hi @Ian_McLaren

Thank you for the question. I wonder if you have used our Period over Period Comparison UI which uses relative_period under the hood. Can you try it out on your metric to see if it achieves the desired effect?