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

Announcements
AWS Degraded - You may experience Community slowness, timeouts, or trouble accessing: LATEST HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
francisvandergr
Partner - Creator II
Partner - Creator II

Year in Variable

sum( {$<Year = {“>1978<2004”}>} Sales )

i am looking for formula above but then year is a variable, and i wanna have all years befor my variable somthing like:

sum( {$<Year = {“<$(vYear)”}>} Sales )

Anybody knows ?

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Looks fine apart from the funny quotes. Regular single or double quotes should work.

     sum( {$<Year = {'<$(vYear)'}>} Sales )

And the variable vYear should resolve to a number.


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Looks fine apart from the funny quotes. Regular single or double quotes should work.

     sum( {$<Year = {'<$(vYear)'}>} Sales )

And the variable vYear should resolve to a number.


talk is cheap, supply exceeds demand
manideep78
Partner - Specialist
Partner - Specialist

Try this

SET vYear=2004;

then use the following expression

Sum({<Year={"<$(vYear)"}>}Sales)

Hope this helps