# Multiple Time range?

**URL:** <https://community.grafana.com/t/multiple-time-range/4671>\
**Category:** Time Series Panel\
**Tags:** time-selection, time-series-panel, panel\
**Created:** [January 5, 2018, 2:54pm UTC](https://community.grafana.com/t/multiple-time-range/4671 "2018-01-05T14:54:45Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![viapass](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/viapass/32/1000_2.png) [@viapass](https://community.grafana.com/u/viapass)\
**Post date:** [January 5, 2018, 2:54pm UTC](https://community.grafana.com/t/multiple-time-range/4671/1 "2018-01-05T14:54:45Z")

</div>

Hi all,

Happy new year to everybody ! 🙂

I created a new dashboard to get thoses differents graph :

 ![image](https://us1.discourse-cdn.com/grafana/original/2X/a/ad2ffa2fa4cb25a0fc5bc96794577fc75a0483d0.png)

I want to display the evolution of user connection for the day (by hour and by minute) but how i can define a different time range for the week :

Check my MySQL Query (for the week ) 🙂

\*\*\*\*\*\* //////  
SELECT COUNT(DISTINCT `login`) as value, UNIX\_TIMESTAMP(`when`) as time\_sec  
FROM logs

WHERE `when` BETWEEN $\_\_timeFrom(now/w) AND $\_\_timeTo(now/w)  
AND  
`type`=‘login’

GROUP BY  
DATE(`when`), HOUR( `when` )  
//////// \*\*\*\*\*\*\*\*

Thanks in advance !

---

<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:** [January 6, 2018, 10:19am UTC](https://community.grafana.com/t/multiple-time-range/4671/2 "2018-01-06T10:19:45Z")

</div>

In panel options there’s is a time range tab where you can specify panel time ranges overrides

---

<div class="post-metadata">

**Author:** ![viapass](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/viapass/32/1000_2.png) [@viapass](https://community.grafana.com/u/viapass)\
**Post date:** [January 6, 2018, 10:33am UTC](https://community.grafana.com/t/multiple-time-range/4671/3 "2018-01-06T10:33:41Z")

</div>

Hi Torkel

Yes but i can’t configured two time range in same time to display differents times series, you see ?

Thanks !

---

<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:** [January 6, 2018, 10:35am UTC](https://community.grafana.com/t/multiple-time-range/4671/4 "2018-01-06T10:35:44Z")

</div>

Why?

One panel can show last 5min, another last 1d, another last 7d

---

<div class="post-metadata">

**Author:** ![viapass](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/viapass/32/1000_2.png) [@viapass](https://community.grafana.com/u/viapass)\
**Post date:** [January 6, 2018, 10:39am UTC](https://community.grafana.com/t/multiple-time-range/4671/5 "2018-01-06T10:39:18Z")

</div>

> [@torkel](#):
>
> panel can show last 5

Because i want to display in same time the evolution of user connection Today and of the week, i can understand if it’s not possible but maybe i think i could use this function :  
$\_\_timeFrom(now/w)

---

<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:** [January 6, 2018, 1:41pm UTC](https://community.grafana.com/t/multiple-time-range/4671/6 "2018-01-06T13:41:32Z")

</div>

So why not use panel time range override ???

---

<div class="post-metadata">

**Author:** ![viapass](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/viapass/32/1000_2.png) [@viapass](https://community.grafana.com/u/viapass)\
**Post date:** [January 11, 2018, 3:40pm UTC](https://community.grafana.com/t/multiple-time-range/4671/7 "2018-01-11T15:40:25Z")

</div>

Hi Torkel,

Sorry for the delay, just to confirm we talk to the same thing :

 ![image](https://us1.discourse-cdn.com/grafana/original/2X/9/9684d4c08a9becfb681b973a3c17b467756c4f86.jpg)

With this tool i can’t see on the two graph in the top of the screen stats of the day, and the third stats of the week.

---

<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:** [January 11, 2018, 3:57pm UTC](https://community.grafana.com/t/multiple-time-range/4671/8 "2018-01-11T15:57:17Z")

</div>

but why not set time range on each panel?

 ![image](https://us1.discourse-cdn.com/grafana/original/2X/f/ff8f75a35633455d1a959104ddbbfc4f5b6f1af2.png)

---

<div class="post-metadata">

**Author:** ![viapass](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/viapass/32/1000_2.png) [@viapass](https://community.grafana.com/u/viapass)\
**Post date:** [January 11, 2018, 4:02pm UTC](https://community.grafana.com/t/multiple-time-range/4671/9 "2018-01-11T16:02:06Z")

</div>

oooooooh My gooood yes indeed i forget this function !

Thanks torkel

---

<div class="post-metadata">

**Author:** ![dsb](https://avatars.discourse-cdn.com/v4/letter/d/90db22/32.png) [@dsb](https://community.grafana.com/u/dsb)\
**Post date:** [January 29, 2019, 3:11pm UTC](https://community.grafana.com/t/multiple-time-range/4671/10 "2019-01-29T15:11:27Z")

</div>

Hello, How do you get two time ranges into 1 panel? also, I’m getting errors that the say the macros  
\_\_unixEpochTo and \_\_unixEpochFrom are unknown!

---

<div class="post-metadata">

**Author:** ![jason80d](https://avatars.discourse-cdn.com/v4/letter/j/e68b1a/32.png) [@jason80d](https://community.grafana.com/u/jason80d)\
**Post date:** [November 4, 2019, 6:13am UTC](https://community.grafana.com/t/multiple-time-range/4671/11 "2019-11-04T06:13:38Z")

</div>

is it has solution with Grafana 6+?

the setting board looks different from upper image.

---

<div class="post-metadata">

**Author:** ![zncaudata](https://avatars.discourse-cdn.com/v4/letter/z/6de8d8/32.png) [@zncaudata](https://community.grafana.com/u/zncaudata)\
**Post date:** [December 6, 2019, 10:55pm UTC](https://community.grafana.com/t/multiple-time-range/4671/12 "2019-12-06T22:55:33Z")

</div>

Same question as jason80d. Changing the time range within the panels on Grafana 6+ changes the time range for the whole dashboard. I’m not seeing a discrete time range option within each panel like Grafana 5.

---

<div class="post-metadata">

**Author:** ![ivanahuckova](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/ivanahuckova/32/8541_2.png) [@ivanahuckova](https://community.grafana.com/u/ivanahuckova)\
**Post date:** [December 9, 2019, 10:58am UTC](https://community.grafana.com/t/multiple-time-range/4671/13 "2019-12-09T10:58:42Z")

</div>

Hello zncaudata! 👋Please check out these threads for more information on how to set time range on each panel for Grafana 6+:

> [@No tabs visible](https://community.grafana.com/t/no-tabs-visible/21742):
>
> Hello, I often see tabs in documentation but on my installation I can’t see any of them in the following view: I’m running on Grafana v6.3.5 (67bad72) What I’m doing wrong? Regards SchiSchi

> [@"Time Range" missing?](https://community.grafana.com/t/time-range-missing/17718):
>
> Hi all, hopefully something really dumb… I’m trying to get different time ranges for different graph panels on a single dashboard. I’m sure I’m missing something obvious, According to the docs, I should see this: However, what I actually see is this:

---

<div class="post-metadata">

**Author:** ![ziaeemehr](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/ziaeemehr/32/17503_2.png) [@ziaeemehr](https://community.grafana.com/u/ziaeemehr)\
**Post date:** [July 8, 2021, 9:41am UTC](https://community.grafana.com/t/multiple-time-range/4671/14 "2021-07-08T09:41:18Z")

</div>

Hi,  
Where is panel options in Grafana 8?  
I don’t see timeoveride option

---

<div class="post-metadata">

**Author:** ![sendaird](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@sendaird](https://community.grafana.com/u/sendaird)\
**Post date:** [September 7, 2021, 1:40am UTC](https://community.grafana.com/t/multiple-time-range/4671/15 "2021-09-07T01:40:39Z")

</div>

Panel’s Time range setting.

Edit → Query options → Relative time to set the Time rage.  
Interval can also be set here.

---

<div class="post-metadata">

**Author:** ![pauliusur](https://avatars.discourse-cdn.com/v4/letter/p/97f17d/32.png) [@pauliusur](https://community.grafana.com/u/pauliusur)\
**Post date:** [December 6, 2021, 12:08pm UTC](https://community.grafana.com/t/multiple-time-range/4671/16 "2021-12-06T12:08:30Z")

</div>

![Untitled](https://us1.discourse-cdn.com/grafana/original/3X/8/b/8b3e1b854aadb4376c952cb9fde8c719e493aab1.jpeg)

---

<div class="post-metadata">

**Author:** ![simonhuber86](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@simonhuber86](https://community.grafana.com/u/simonhuber86)\
**Post date:** [August 24, 2022, 5:28am UTC](https://community.grafana.com/t/multiple-time-range/4671/17 "2022-08-24T05:28:32Z")

</div>

> [@torkel](#):
>
> time range o

I run Grafana \* v9.0.5 on Docker on Synology NAS. I don’t see the Time Range Options. I can’t find override relative time…

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/c/e/ce391b0ad28e225ac6d2eec0bc4bd6e953ea79d0.png)

I want to add an additional query, to compare the previous year.  
How can I do this? Thanks, torkel.

---

<div class="post-metadata">

**Author:** ![simonhuber86](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@simonhuber86](https://community.grafana.com/u/simonhuber86)\
**Post date:** [August 24, 2022, 5:32am UTC](https://community.grafana.com/t/multiple-time-range/4671/18 "2022-08-24T05:32:08Z")

</div>

Thats right. Is it also possible to set different time shifts for two different queries? I want to compare the values with the previous year

---

<div class="post-metadata">

**Author:** ![marcko](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/marcko/32/26213_2.png) [@marcko](https://community.grafana.com/u/marcko)\
**Post date:** [September 19, 2022, 10:44pm UTC](https://community.grafana.com/t/multiple-time-range/4671/19 "2022-09-19T22:44:32Z")

</div>

This is the correct way to do it, thanks

---

<div class="post-metadata">

**Author:** ![personen02](https://avatars.discourse-cdn.com/v4/letter/p/dbc845/32.png) [@personen02](https://community.grafana.com/u/personen02)\
**Post date:** [January 2, 2023, 7:58am UTC](https://community.grafana.com/t/multiple-time-range/4671/20 "2023-01-02T07:58:27Z")

</div>

Issue is still there: impossible to show on one dashboard two time series graphs with different time ranges of the panels, e.g. one panel for last 30min and another for 24h.

Using v9.3.2. Data source mysql.  
Query (same for both panels): select FROM\_UNIXTIME(ts/1000) as adate, round(val) as aval from ts\_number where id=186 order by adate desc LIMIT 1440;  
One measurement per minute record.

Dashboard time range setting: last 30min.

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/0/9/09f40d8429d5761c54d754b6dfe153790973acbb.png)  
 ![image](https://us1.discourse-cdn.com/grafana/original/3X/d/9/d9f9dd5ce573bba8d8d7783626cf43ea12de51de.png)
