# Timeline variable in Dashboard

**URL:** <https://community.dynatrace.com/t/timeline-variable-in-dashboard/54574>\
**Category:** DQL\
**Tags:** dql, notebooks\
**Created:** [January 9, 2026, 7:34am UTC](https://community.dynatrace.com/t/timeline-variable-in-dashboard/54574 "2026-01-09T07:34:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mani\_Muthu3001](https://avatars.discourse-cdn.com/v4/letter/m/8491ac/32.png) [@Mani\_Muthu3001](https://community.dynatrace.com/u/Mani_Muthu3001)\
**Post date:** [January 9, 2026, 7:34am UTC](https://community.dynatrace.com/t/timeline-variable-in-dashboard/54574/1 "2026-01-09T07:34:21Z")

</div>

I have Timeline variable in Dashboard which is List Type and i provided values 30m, 1h, 2h which can be used as dropdown

But when i tried to use Timeline variable in DQL , It is showing 0 records.&nbsp; But if i used without variable it is showing records

DQL i used

fetch dt.davis.problems

| filter event.start \>= now - toDuration($Timeline)

Please help what to be changed in above DQL.

---

<div class="post-metadata">

**Author:** ![GerardJ](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/gerardj/32/154_2.png) [@GerardJ](https://community.dynatrace.com/u/GerardJ)\
**Post date:** [January 9, 2026, 7:53am UTC](https://community.dynatrace.com/t/timeline-variable-in-dashboard/54574/2 "2026-01-09T07:53:19Z")

</div>

Hi&nbsp;[@Mani\_Muthu3001](https://community.dynatrace.com/user/98384)&nbsp;  
Looking at the toDuration function documentation

 ![GerardJ_0-1767945117928.png](https://global.discourse-cdn.com/dynatrace/original/3X/f/1/f1302f083000ec10b7ea8d28aebdbe9c9508da1a.png)

you have to use your variable with the “:noquote” strategy ([Add a variable to a dashboard — Dynatrace Docs](https://docs.dynatrace.com/docs/shortlink/dashboard-component-variable#variable-types)).  
Should work with this DQL :

```markup
fetch dt.davis.problems
| filter event.start >= now() - toDuration($Timeline:noquote)

```
