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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis differ in expression and script

Hi,

I am using

sum( {$<ProductID2 = {$(=max(ProductID2))} >} ListPrice )

in a chart expression and it works fine.

When I use the same code in a script I get an internal error in the {$(=max(ProductID2))} - part.

set vMySales = sum( {$<ProductID2 = {$(=max(ProductID2))} >} ListPrice )

How come it does not work the same way?

Kind regards

Peter

Labels (1)
1 Reply
Not applicable
Author

Hi,

I thought you always had to surround strings with double quotes in a SET statement.

Also: is your ProductID2 field available at the time of calculation?

Dion Verbeke

Sr BI Consultant