Data outside time range using months

Hi,
I have my data grouped by month, an issue happens if my time filter is > 30 days the message of data outside the time range appears.

Query:

SELECT DISTINCT 
monthname(created_on) as metric,
Y.SLAMETCLOSE/X.CLOSEDTICKETS*100,
month(created_on) as time_sec
where $__timeFilter(created_on)
GROUP by metric
order by time_sec

Any idea to solve this?

SOLUTION: now() as time_sec