Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Variable expressions in set analysis

Hi ;

I have 2 variables (vMaxWeek) and (vMaxWeek_3). The variables are correct are pulling values.

I then wrote this set analysis expression:

=sum(   {<[WeekNumber] = {>=$(vMaxWeek) <= $(vMaxWeek_3)}>}      loadingDuration).

The result is not correct.


Please assist.

3 Replies
Not applicable
Author

try to use ' ', something like:

=sum(   {<[WeekNumber] = {'>=$(vMaxWeek) <= $(vMaxWeek_3)'}>}      loadingDuration)

instead of

=sum(   {<[WeekNumber] = {>=$(vMaxWeek) <= $(vMaxWeek_3)}>}      loadingDuration)


for my example, it worked

petter
Partner - Champion III
Partner - Champion III

You must enclose the search in double-quotes like this:

=sum(  {<[WeekNumber] = {">=$(vMaxWeek) <= $(vMaxWeek_3)"}>}   loadingDuration)

petter
Partner - Champion III
Partner - Champion III

Furthermore the variables might have to be evaluated depending what is in them - constants or expressions.

So you might have to write:

=sum(   {<[WeekNumber] = {>=$(=vMaxWeek) <= $(=vMaxWeek_3)}>}      loadingDuration).