Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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
MVP
MVP

Try the variable like this

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