State Timeline X Axis time range using MSSQL

Hello. I’m trying to dynamically set the X-Axis time range for a State Timeline. I keep going in circles by trying many things, so I’m not getting anywhere. I’m obviously not understanding something.
At it’s most fundemental level, I can’t seem to get the X-Axis FROM (left side of the timeline) time range to adjust using any of the Query Options fields. My DATA follows the Relative field, but the X-Axis timeline doesn’t. The timeline works fine when using the date/time picker, but doesn’t change at all when I adjust any of the Query option parameters. My data changes, but the timeline range doesn’t. What am I missing?

I’m using Grafana 11.4 on Windows with MSSQL DB.

In the attached screenshot, I have 1h in the Relative field. My data is showing 1h of data, but the Timeline is many hours. How can I set the timeline timespan to a specific time, without using the DateTime picker? I need the time in the yellow to match now-1hr (in this example)

Then, ultimately, after I understand where I’m going wrong, I need to use a variable to set the FROM timeline range. I figure I need to know the basics beforehand though.

Thanks for any help! I’d greatly appreciate it!

can you share you sql query or a sanitized table view of your data?

No problem. Here’s the query and resulting records:

SELECT
DateTimeUTC AS [time],
CASE
WHEN InProduction = 0 THEN 999
WHEN TMax = 0 THEN 0
ELSE (Total * 100.0 / TMax)
END AS TMaxPercent
FROM vw_tblLinesProduction_Combined
WHERE LineID = $LineID
AND DateTimeUTC >= $__timeFrom()

Returned records:

time TMaxPercent
2025-02-12 16:03:29.957 0
2025-02-12 15:05:00.060 41.95807
2025-02-12 15:45:00.587 0
2025-02-12 16:00:00.777 0
2025-02-12 15:10:00.857 52.40826
2025-02-12 15:20:00.430 90.90913
2025-02-12 15:25:00.260 91.91415
2025-02-12 15:15:00.637 91.12176
2025-02-12 15:35:00.843 66.55902
2025-02-12 15:40:00.633 23.2303
2025-02-12 15:30:01.000 67.04321
2025-02-12 15:50:00.233 0
2025-02-12 15:55:01.010 0