Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
jim_chan
Specialist
Specialist

Set Analaysis with Variable - got result , but script editor says Error in expression

hi guys, 

I have created the variable and used in this set analysis expression. in the script, i dont know why it says error in expression, but at the front end, it produces the result out. 

how to fix the error in expression? 

there is no issue if i just write sum(QUANTITY). 

screenshot7.jpg

 

rgds

 

jim

Labels (3)
2 Replies
lblumenfeld
Luminary Alumni
Luminary Alumni

Is this a QlikView app? It so then what you're seeing is okay (or better stated—normal for the editor). There are some combinations of set analysis that the editor flags as a syntax error even though it is correct. Dollar-sign expansion alone inside the {< ... >} is one of those combinations.

As long as you are careful that this always expands to a valid set analysis expression then you don't have anything to worry about.

I've found that the Qlik Sense formula editor does a better job of interpreting these as correct.

 

shekharnil
Contributor III
Contributor III

Hi Jim

There are certain scenarios where the editor is expecting some values but doesn't get it and has to replace with the defaults.

$ operator is also one of them where the value is put in place of the variable, but this happens at the time of execution and not while writing (as the variable may be dynamically assigned).

So in other words this is acceptable and expected to show warning error for the expression.

p.s. You may be able to get away with this using quotes but that doesn't change anything.