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

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
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())