DQL
Questions about Dynatrace Query Language
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Timeline variable in Dashboard

Mani_Muthu3001
Visitor

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.  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.

1 REPLY 1

GerardJ
Pro

Hi @Mani_Muthu3001 
Looking at the toDuration function documentation

GerardJ_0-1767945117928.png

you have to use your variable with the ":noquote" strategy (https://docs.dynatrace.com/docs/shortlink/dashboard-component-variable#variable-types).
Should work with this DQL :

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

 

Gerard

Featured Posts