# Add a timestamp/day filter on an existing DQL tile

**URL:** <https://community.dynatrace.com/t/add-a-timestamp-day-filter-on-an-existing-dql-tile/48007>\
**Category:** DQL\
**Tags:** dql\
**Created:** [September 27, 2024, 5:58am UTC](https://community.dynatrace.com/t/add-a-timestamp-day-filter-on-an-existing-dql-tile/48007 "2024-09-27T05:58:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sandytheSeeker](https://avatars.discourse-cdn.com/v4/letter/s/5daacb/32.png) [@sandytheSeeker](https://community.dynatrace.com/u/sandytheSeeker)\
**Post date:** [September 27, 2024, 5:58am UTC](https://community.dynatrace.com/t/add-a-timestamp-day-filter-on-an-existing-dql-tile/48007/1 "2024-09-27T05:58:58Z")

</div>

Hello All,

I want to restrict my output to last 7 days everytime the dashboard refreshes. I have a tile which bring me all the failed job list. I want to restrict it programatically to get only last 7 days. My tile code looks like this.

cloud.aws.amazonmwaa.dagDurationFailedByAccountIdDAGEnvironmentRegion:filter(eq(“environment”,“sandbox-test”))

I tried adding filter at the end of it, but it doesn’t accept. Also the fetch command doesn’t seem to work on this as well.

I’m pretty new to this, so this could be a very basic question.

---

<div class="post-metadata">

**Author:** ![p\_devulapalli](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/p_devulapalli/32/41590_2.png) [@p\_devulapalli](https://community.dynatrace.com/u/p_devulapalli)\
**Post date:** [September 27, 2024, 6:06am UTC](https://community.dynatrace.com/t/add-a-timestamp-day-filter-on-an-existing-dql-tile/48007/2 "2024-09-27T06:06:24Z")

</div>

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

Have you tried the below?

> **[Use DQL queries](https://docs.dynatrace.com/docs/platform/grail/dynatrace-query-language/dql-guide)**
>
> Find out how DQL works and what are DQL key concepts.

---

<div class="post-metadata">

**Author:** ![sandytheSeeker](https://avatars.discourse-cdn.com/v4/letter/s/5daacb/32.png) [@sandytheSeeker](https://community.dynatrace.com/u/sandytheSeeker)\
**Post date:** [September 29, 2024, 9:01pm UTC](https://community.dynatrace.com/t/add-a-timestamp-day-filter-on-an-existing-dql-tile/48007/3 "2024-09-29T21:01:58Z")

</div>

Hi&nbsp;[@p\_devulapalli](https://community.dynatrace.com/user/21657)&nbsp;,

I tried all these possible options, but the issue seems to be that I can’t combine fetch command with my command. I thought it would have easier to implement. “cloud.aws.amazonmwaa.dagDurationFailedByAccountIdDAGEnvironmentRegion:filter(eq(“environment”,“sandbox-test”))”

 ![sandytheSeeker_0-1727643669937.png](https://global.discourse-cdn.com/dynatrace/original/3X/4/7/4766375a74e1271975d50b7584f8f6ee63648ea6.png)

---

<div class="post-metadata">

**Author:** ![p\_devulapalli](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/p_devulapalli/32/41590_2.png) [@p\_devulapalli](https://community.dynatrace.com/u/p_devulapalli)\
**Post date:** [September 30, 2024, 4:23am UTC](https://community.dynatrace.com/t/add-a-timestamp-day-filter-on-an-existing-dql-tile/48007/4 "2024-09-30T04:23:46Z")

</div>

Hi&nbsp;[@sandytheSeeker](https://community.dynatrace.com/user/81275)&nbsp;, from the screenshot you seem to be running the query in Data explorer , if you are after DQL queries you need to use something like Notebooks

> **[Notebooks](https://docs.dynatrace.com/docs/analyze-explore-automate/dashboards-and-notebooks/notebooks)**
>
> Analyze, visualize, and share insights from your observability data—all in one collaborative, customizable workspace.

[![](https://global.discourse-cdn.com/dynatrace/original/3X/1/3/13f62d4b94769d441f5e3674a8b09a3f7858c6aa.jpeg "Dynatrace Notebooks & DQL in Action") ](https://www.youtube.com/watch?v=RAtId3P8C6I)

---

<div class="post-metadata">

**Author:** ![Fin\_Ubels](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/fin_ubels/32/18008_2.png) [@Fin\_Ubels](https://community.dynatrace.com/u/Fin_Ubels)\
**Post date:** [September 30, 2024, 4:55am UTC](https://community.dynatrace.com/t/add-a-timestamp-day-filter-on-an-existing-dql-tile/48007/5 "2024-09-30T04:55:41Z")

</div>

Hey Sandy,

As&nbsp;p\_devulapalli&nbsp;mentioned it looks like you’re trying to use our new query language on classic dashboards which unfortunately is not supported. If you are using Dynatrace SaaS you could try the new dashboards app. Within the new dashboards app you will be able to query logs, metrics, events and other data using DQL allowing for things such as the fetch command.

 ![Fin_Ubels_0-1727671250582.png](https://global.discourse-cdn.com/dynatrace/original/3X/f/f/ffe0c9febb67298b97d894c771a6feeada38d1d0.png)

On new dashboards to set a timeframe on a specific tile edit the tile and custom timeframes can be found under the query or you can set it in the query as well:

 ![Fin_Ubels_5-1727671992486.png](https://global.discourse-cdn.com/dynatrace/original/3X/a/5/a5010ba76e8ec6e90b4e9b48f523444616667fd8.png)

For dashboard wide defaults you can set it in the dashboard settings by selecting the settings cog to the right of the timeframe selector:

 ![Fin_Ubels_4-1727671814546.png](https://global.discourse-cdn.com/dynatrace/original/2X/2/276cac85ad50bccf350484140094b1c6279a1e87.png)

Alternatively on old dashboards you can set the default timeframe for a dashboard or a specific tile. For the whole dashboard edit the dashboard and then instead of the tiles tab, select the settings tab on the right as seen below:

 ![Fin_Ubels_1-1727671392916.png](https://global.discourse-cdn.com/dynatrace/original/3X/6/5/65361d671e8ab8a346d4d20b8614ae6ebfbe6543.png)

For a specific tile select the tile and edit it and then you can find it on the right as seen below:

 ![Fin_Ubels_2-1727671433694.png](https://global.discourse-cdn.com/dynatrace/original/3X/a/a/aa16e39d1154cb63c7319b688820108ab92b8d8c.png)

Hope the above helps!

---

<div class="post-metadata">

**Author:** ![sandytheSeeker](https://avatars.discourse-cdn.com/v4/letter/s/5daacb/32.png) [@sandytheSeeker](https://community.dynatrace.com/u/sandytheSeeker)\
**Post date:** [September 30, 2024, 8:48pm UTC](https://community.dynatrace.com/t/add-a-timestamp-day-filter-on-an-existing-dql-tile/48007/6 "2024-09-30T20:48:41Z")

</div>

Thanks&nbsp;[@Fin\_Ubels](https://community.dynatrace.com/user/47376)&nbsp;&&nbsp;[@p\_devulapalli](https://community.dynatrace.com/user/21657) for your prompt responses.

I have found above useful and didn’t know if we have that timeframe configure option at edit tile level. I was trying to implement it at metric logic level.

Thanks again.
