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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
vikasshana
Creator III
Creator III

Error in Expression ')' expected, tried everything but now workinf

Hi,

I have the below code and when I'm using a text box to write an expression I'm getting error message like 'Error in Expression: ')' expected', not sure what is wrong in it.

Let vTest=2;

Let vCurrent = max(Year);

Let vBefore = ($(vCurrent)-1)

In my Text Object I'm using below code and is not working.

=num(pick($(vTest),sum($(vBefore )Sales1),sum($(vBefore )Sales2)),'$#,##0;-$#,##0')

Regards,

V

2 Replies
tresesco
MVP
MVP

There could be more than one issue here. It seems that, you are trying to calculate current/previous year sales amount based on vTest variable value. If so, missing part is 'Year' in set analysis. Try to share a sample data set and explain your expected output in that context.

vikasshana
Creator III
Creator III
Author

Made some changes and got it resolved. Thanks for your help @tresesco