Why am I not getting any data when using rate() function in Grafana?

Hello community, i have a weird behavior in grafana. I am using prometheus as datasource to query the metrics. when i use node_cpu_seconds_total{} query, i get all the values. But the catch is, when i use it with the rate() function I am not getting any data. what could be the possible issue with this.

PS: Until yesterday the query was working perfectly well (worked for more than 3 months). from today, if i use the rate() function for any of the metrics, it says no data.

Are you using rate with a range vector selector, e.g. rate(node_cpu_seconds_total{}[5m])? Is it possible that the interval in which your data are scraped changed? We’ve observed it, when selector (5m) was less than the scrape interval - rate wants to calculate rate between the first and last point in sample, but if there’s no data in sample, there’s nothing to calculate

Thanks for the response i will try your suggestion.
To my surprise it works. initial query was like irate(node_cpu_seconds_total{}[$__rate_interval]) and it was working good for more than 3 months. Now when i change the range [] from the default value to over 6m then it works fine. what could be the problem? i did not understand completely but it works now