How to use time range as a parameter in query expression?

I have tried creating a template variable name Interval and used auto option with step count 2,but that does not seem to work.

can you elaborate more on the data source type sample data screenshots error you getting logs ?