# How to set a custom timeframe which is shifted from the base timeframe?

**URL:** <https://community.dynatrace.com/t/how-to-set-a-custom-timeframe-which-is-shifted-from-the-base-timeframe/33472>\
**Category:** Dashboarding\
**Tags:** timeframe, request-attributes, dashboards-classic\
**Created:** [December 7, 2021, 7:55am UTC](https://community.dynatrace.com/t/how-to-set-a-custom-timeframe-which-is-shifted-from-the-base-timeframe/33472 "2021-12-07T07:55:32Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![istvan\_safranek](https://avatars.discourse-cdn.com/v4/letter/i/ed655f/32.png) [@istvan\_safranek](https://community.dynatrace.com/u/istvan_safranek)\
**Post date:** [December 7, 2021, 7:55am UTC](https://community.dynatrace.com/t/how-to-set-a-custom-timeframe-which-is-shifted-from-the-base-timeframe/33472/1 "2021-12-07T07:55:32Z")

</div>

Hello!

I have a dashboard with 4 tiles. Each shows key request statistics.

I want to clone these tiles and set a custom timeframe which is shifted from the dashboard base timeframe with x minutes or hours or days etc.

Is this possible to set shifted timeframe?

---

<div class="post-metadata">

**Author:** ![KaliprasadP](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/kaliprasadp/32/17997_2.png) [@KaliprasadP](https://community.dynatrace.com/u/KaliprasadP)\
**Post date:** [December 7, 2021, 8:56am UTC](https://community.dynatrace.com/t/how-to-set-a-custom-timeframe-which-is-shifted-from-the-base-timeframe/33472/2 "2021-12-07T08:56:21Z")

</div>

Hello&nbsp;[@istvan\_safranek](https://community.dynatrace.com/user/11521)&nbsp;,

There is an option for that once you select the tile in edit mode, in data explore you have a custom timeframe, you can set time for the tile, based on your request.

 ![KaliprasadP_0-1638867335655.png](https://global.discourse-cdn.com/dynatrace/original/3X/f/d/fd8040fe5c5797e2a3dcfcb016af331a521dedeb.png)

Regards

Kaliprasad P

---

<div class="post-metadata">

**Author:** ![istvan\_safranek](https://avatars.discourse-cdn.com/v4/letter/i/ed655f/32.png) [@istvan\_safranek](https://community.dynatrace.com/u/istvan_safranek)\
**Post date:** [December 7, 2021, 9:16am UTC](https://community.dynatrace.com/t/how-to-set-a-custom-timeframe-which-is-shifted-from-the-base-timeframe/33472/3 "2021-12-07T09:16:53Z")

</div>

Hello [@KaliprasadP](https://community.dynatrace.com/user/46356)

Unfortunately it’s not good for me. If I set the tile’s custom timeframe to Yesterday, it will always show Yesterday’s data if I change the dashboard main timeframe in the upper right corner.

br, Istvan

---

<div class="post-metadata">

**Author:** ![zietho](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/zietho/32/41733_2.png) [@zietho](https://community.dynatrace.com/u/zietho)\
**Post date:** [December 7, 2021, 9:39am UTC](https://community.dynatrace.com/t/how-to-set-a-custom-timeframe-which-is-shifted-from-the-base-timeframe/33472/4 "2021-12-07T09:39:24Z")

</div>

You can apply the timeshifts in the Data explorer itself using the code mode (see last illustration below how to do it) and it will then also take the selected timeframe on the dashboard into account like

 ![zietho_0-1638869811659.png](https://global.discourse-cdn.com/dynatrace/original/2X/d/dec8832b98bf2ec5ba4cce462c7e43252d6c8259.png)

 ![zietho_1-1638869829664.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/e/ee5a658056f3390e55aae6010fe80a08df332b52.png)

 ![zietho_2-1638869903081.png](https://global.discourse-cdn.com/dynatrace/original/3X/9/9/99a97ea644bccf145af54c61cfa24ca474d0c3f5.png)

Doc links:

> **[Data Explorer Advanced mode query editor](https://docs.dynatrace.com/docs/analyze-explore-automate/explorer/explorer-advanced-query-editor)**
>
> Build advanced queries using the Data Explorer advanced mode.

> **[Metrics API - Metric selector](https://docs.dynatrace.com/docs/dynatrace-api/environment-api/metric-v2/metric-selector)**
>
> Configure the metric selector for the Metric v2 API.

Hope that helps.

Regards

Thomas

---

<div class="post-metadata">

**Author:** ![istvan\_safranek](https://avatars.discourse-cdn.com/v4/letter/i/ed655f/32.png) [@istvan\_safranek](https://community.dynatrace.com/u/istvan_safranek)\
**Post date:** [December 7, 2021, 10:11am UTC](https://community.dynatrace.com/t/how-to-set-a-custom-timeframe-which-is-shifted-from-the-base-timeframe/33472/5 "2021-12-07T10:11:47Z")

</div>

[@zietho](https://community.dynatrace.com/user/23400)thank you. I will try it on a normal Graph tile. Unfortanetly the Service or request tile has no option to see the data explorer. Would be nice to be there too.

---

<div class="post-metadata">

**Author:** ![Yosi\_Neuman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/yosi_neuman/32/9845_2.png) [@Yosi\_Neuman](https://community.dynatrace.com/u/Yosi_Neuman)\
**Post date:** [December 8, 2021, 12:08pm UTC](https://community.dynatrace.com/t/how-to-set-a-custom-timeframe-which-is-shifted-from-the-base-timeframe/33472/6 "2021-12-08T12:08:03Z")

</div>

Hi&nbsp;[@zietho](https://community.dynatrace.com/user/23400)

The only problem with your suggestion is that the shift is with in the time of the time picker which mean that if you want to show count for whole day yesterday , month ago and 3 month ago IMO it will not work.

What we done for this is to set the time picker in each tile for,&nbsp;today&nbsp; , yesterday , 1 day 7 day ago (-7d/d to -6d/d), 1 day 30 day ago (-30d/d to -29d/d)

You can also adjust the start and end time in day as appears in the timeframe selector guide

 ![Yosi_Neuman_0-1638965212240.png](https://global.discourse-cdn.com/dynatrace/original/2X/6/6d8c798bebcab0dc14a90c2c0f9a2619481be3be.png)

HTH

Yos

---

<div class="post-metadata">

**Author:** ![zietho](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/zietho/32/41733_2.png) [@zietho](https://community.dynatrace.com/u/zietho)\
**Post date:** [December 14, 2021, 12:15pm UTC](https://community.dynatrace.com/t/how-to-set-a-custom-timeframe-which-is-shifted-from-the-base-timeframe/33472/7 "2021-12-14T12:15:06Z")

</div>

Yes you are right but my answer was intentional to providing means to shift according to the selected timeframe.

So in essence there are two ways you can shift:

\* **static shifts** according to the current time =\> select custom timeframe for a tile

\* **dynamic shifts** according to the selected time frame =\> :timeshift transformation in the Data explorer

Hope that clarifies what you can do.

regards

---

<div class="post-metadata">

**Author:** ![zietho](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/zietho/32/41733_2.png) [@zietho](https://community.dynatrace.com/u/zietho)\
**Post date:** [December 14, 2021, 12:17pm UTC](https://community.dynatrace.com/t/how-to-set-a-custom-timeframe-which-is-shifted-from-the-base-timeframe/33472/8 "2021-12-14T12:17:09Z")

</div>

Yes and no.

They usually underly metrics. The moment you find the metric you can use any of the Data explorer tiles (+ timeshift in code mode) to do it. Honeycombs will hit the stage in Q1/early Q2 so you can “partially” replicate the service health tile. However, the tiles are then based on metrics, not problems, for a start.

Problems on top we also will look into later next year though.

cheers.

---

<div class="post-metadata">

**Author:** ![Tanveermd](https://avatars.discourse-cdn.com/v4/letter/t/90db22/32.png) [@Tanveermd](https://community.dynatrace.com/u/Tanveermd)\
**Post date:** [May 2, 2024, 12:55pm UTC](https://community.dynatrace.com/t/how-to-set-a-custom-timeframe-which-is-shifted-from-the-base-timeframe/33472/9 "2024-05-02T12:55:03Z")

</div>

How do I apply Timeshift in DQL?

---

<div class="post-metadata">

**Author:** ![zietho](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/zietho/32/41733_2.png) [@zietho](https://community.dynatrace.com/u/zietho)\
**Post date:** [May 2, 2024, 3:40pm UTC](https://community.dynatrace.com/t/how-to-set-a-custom-timeframe-which-is-shifted-from-the-base-timeframe/33472/10 "2024-05-02T15:40:40Z")

</div>

Check out an example ok this dashboard:&nbsp;[Dynatrace](https://wkf10640.apps.dynatrace.com/ui/document/v0/#share=b2414393-2ab2-429b-9cc9-0900595c5f75)

or you can use „Explore metrics“ and add the „Compare to previous period“
