Probably because the dashboard query is using a rate with a fixed interval, e.g.
rate(foo[2m])
This won't work with a scrape interval of 2m, because the 2m time range only includes one data point, and at least two data points are required to calculate a range.
Firstly, change the query to:
rate(foo[$__rate_interval])
Then go to Grafana settings, Prometheus data source, and configure the actual scrape interval you are using.
$__rate_interval returns the larger of:
* 4 times the configured scrape interval; or
* the configured scrape interval plus the interval between points on the graph (when zoomed out a long way)