Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
JustinDallas
Specialist III
Specialist III

SET doesn't evaluate inner SetExpression

Hello Folks,

 

In my load script, I have some variables declared that I use in my app and NPrinting.  The bulk of them work just fine, but when I get to this one:

SET vTractorCount = COUNT({<[CalDate]={"$(=Min(CalDate))"}>} [Tractor Number])

 

I'm finding that QlikSense isn't evaluating that inner term of {"$(=Min(CalDate))"} .  It shows that the term is {""}.  However, when I copy and paste my SA into a KPI component, it works like a charm.

What am I missing with why Qlik doesn't like that inner term in my Set Analysis variable?

 

Any help is greatly appreciated.

 

 

Labels (2)
1 Solution

Accepted Solutions
GaryGiles
Specialist
Specialist

You may want to try using a LET statement and building it as a string.  Then you can prevent the $ expansion from occuring in your load script:

LET vTractorCount = 'COUNT({<[CalDate]={"$'&'(=Min(CalDate))"}>} [Tractor Number])';

View solution in original post

2 Replies
GaryGiles
Specialist
Specialist

You may want to try using a LET statement and building it as a string.  Then you can prevent the $ expansion from occuring in your load script:

LET vTractorCount = 'COUNT({<[CalDate]={"$'&'(=Min(CalDate))"}>} [Tractor Number])';

JustinDallas
Specialist III
Specialist III
Author

It worked.  I don't like it, but it worked as expected!