# Time Range Controls

**URL:** <https://community.grafana.com/t/time-range-controls/18212>\
**Category:** Prometheus\
**Created:** [June 11, 2019, 2:46pm UTC](https://community.grafana.com/t/time-range-controls/18212 "2019-06-11T14:46:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hayk96](https://avatars.discourse-cdn.com/v4/letter/h/7993a0/32.png) [@hayk96](https://community.grafana.com/u/hayk96)\
**Post date:** [June 11, 2019, 2:46pm UTC](https://community.grafana.com/t/time-range-controls/18212/1 "2019-06-11T14:46:31Z")

</div>

Hello!  
I use Grafana as visualisation tool for all metrics of my Prometheus datasource.  
I have a question concerning time ranges. I get Cloudflare bandwith (cached+uncached bandwidth) metrics. When I want to display graph and **Total value** of this metric _cloudflare\_pop\_bandwidth\_bytes_ in prometheus the value it gives for _sum(sum\_over\_time(cloudflare\_pop\_bandwidth\_bytes[24h]))_ is right just like for 1h, 24h and 30d, but in Grafana dashboard the indicators are different for the same time range.  
For example, when I select **last 30 days** on Time Range panel in Grafana it returns this value **219.30 TB** which is less than it is for 12h or **24h (223.05 TB)**, which is not possible. Also, when I compare **Total value** in Prometheus and Grafana, the values are different.  
**This is my query and value per Petabytes in Prometheus for 30 days:**

 ![30day](https://us1.discourse-cdn.com/grafana/original/2X/a/afcd701aa0c0371f7d2978b54395e7e1178f7dba.jpeg)

**And this is the graph for same metric in Grafana for last 30 days:**

 ![grafana](https://us1.discourse-cdn.com/grafana/original/2X/d/d3263c4f6061853230f0f5d2f82789d1cb9cfe62.jpeg)

Thanks in advance.  
Looking forward to your answer.

---

<div class="post-metadata">

**Author:** ![torkel](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/torkel/32/20_2.png) [@torkel](https://community.grafana.com/u/torkel)\
**Post date:** [June 11, 2019, 4:31pm UTC](https://community.grafana.com/t/time-range-controls/18212/2 "2019-06-11T16:31:23Z")

</div>

You need to use the function sum over time with a range vector same as step [$\_\_range]

---

<div class="post-metadata">

**Author:** ![hayk96](https://avatars.discourse-cdn.com/v4/letter/h/7993a0/32.png) [@hayk96](https://community.grafana.com/u/hayk96)\
**Post date:** [June 11, 2019, 4:55pm UTC](https://community.grafana.com/t/time-range-controls/18212/3 "2019-06-11T16:55:45Z")

</div>

Thank You very much!
