Hello, I need my graph to compare sessions from this month to last month for example, how does one go about doing this? I have played around with every single variable possible and intervals but we want it to change upon user selection of time range on the top right. I can write queries that force it such as -
SELECT $__timeGroup(date, ‘24h’), sum(sessions) as sessions_30d
WHERE date BETWEEN (CURRENT_TIMESTAMP - INTERVAL ‘60 day’) AND (CURRENT_TIMESTAMP - INTERVAL ‘30 day’)
GROUP BY date ORDER BY date
but this defeats the purpose of the dynamic possibility on the top right date range selection and ALSO it falls off the chart if not selected a larger range from the top right. How does one do this? I have tried with __timeFrom() AND __timeTo() also and the interval variable and the timeframe variable. Any help/advice appreciated, thanks.