I have done what in https://stackoverflow.com/questions/47141967/how-to-use-the-selected-period-of-time-in-a-query suggests but find it doesn’t work when the selected time range is above 1 day. The variable just sticks to 1d even I select Last 48 hours. Please forget about my comments about the $__interval, I have solved that problem. I have checked the community How to get the time range selected on the dashboard into a variable and find the problem may not be able to be solved, it that still impossible now?