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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

set analysis syntax error

Can someone please tell me whats wrong with these two syntaxes

1)

sum({<Year = ">= ($(CurrrentYear) - 2)">})

sum({<Year = ">= $(CurrrentYear) - 2">})

2)

sum({<Year = " ($(CurrrentYear) - 2)">})

Shah

6 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

The part on the right side of the = sign needs to be enclosed in curly braces too:

  1. sum({<Year = {">= $(CurrrentYear) - 2"} >}) 

talk is cheap, supply exceeds demand
sivarajs
Specialist II
Specialist II

Sum({<Year = {">= $(CurrrentYear - 2)"}>})

Not applicable
Author

still not working. I have confirmed that there is data for 2013 and 2014 and variable CurrrentYear value is 2014. I am doing some mistake in the syntamx

sum({<Year = {">= $(CurrrentYear) - 2"} >} revenue)

Shah

anbu1984
Master III
Master III

Can you attach sample qvw

rubenmarin

Hi Syed, you can try:

sum({<Year = {">= $(=CurrrentYear-2)"}>} revenue)

Check if 'currrent' (with 3 'r') is correct.

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Make sure to use the exact case sensitive field names.

Check that the expression works if you hard code the year:

  • sum({<Year = {">=2014"} >} revenue) 

talk is cheap, supply exceeds demand