Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Error in date range variable

Hi,

I have $TrendDate named variable, which im trying to use to filter a chart by date. Heres an example to what value I set the variable:

=>Date(Today()-7)<=Date(Today()) - which would mean select a weeks date range right? How ever, I get an expression error stating

"Garbage after expression 'Date'" here. What kind of syntax should I use here?

Here is how I use the variable in the chart expression:

Avg({$<Date={'$(TrendDate)'}>}[#Value])

// Tuomas

1 Reply
sunny_talwar

Try the variable like this

='>' & Date(Today()-7) & '<=' & Date(Today())