Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Select in field based on variable condition

Hi,

I want to select all the countries on button click whose GDP is greater than upper range for its region.

For example:

Select in Field:   Country

Search String:    =vGDP >= [Upper Range]   or =$(vGDP) >= [Upper Range]

However, no countries are getting selected. Can anyone help?

Thanks,

1 Solution

Accepted Solutions
sinanozdemir
Specialist III
Specialist III

Let's try the below:

='(' & Concat(If(Aggr($(vGDP), Country)>= [Upper Range], Country), '|') & ')'


Thanks

View solution in original post

8 Replies
hemhund2016
Creator
Creator

Some thing like this will help.

Field:                 Country

Search String:   = '("' & concat({<vGDP={'>=$(=Max(Range))'}>} Country,'" | "') & '')'

Thanks,

Hemanth.

sinanozdemir
Specialist III
Specialist III

Try the below in the search string:

='(' & Concat(If($(vGDP) >= [Upper Range], Country), '|') & ')'

Not applicable
Author

Hi Sinan,

This somewhat helps but only one country is getting selected not all countries whose GDP is greater than upper range of its region.

Thanks,

sinanozdemir
Specialist III
Specialist III

What is in the variable, such Sum(), Count(), etc?

Not applicable
Author

For vGDP ? Its sum.

sinanozdemir
Specialist III
Specialist III

Let's try the below:

='(' & Concat(If(Aggr($(vGDP), Country)>= [Upper Range], Country), '|') & ')'


Thanks

Not applicable
Author

Perfect! Thank you so much!

sinanozdemir
Specialist III
Specialist III

You are welcome.