Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
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
Highlighted
sinanozdemir
Valued Contributor III

Re: Select in field based on variable condition

Let's try the below:

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


Thanks

View solution in original post

8 Replies
hemhund2016
Contributor

Re: Select in field based on variable condition

Some thing like this will help.

Field:                 Country

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

Thanks,

Hemanth.

Highlighted
sinanozdemir
Valued Contributor III

Re: Select in field based on variable condition

Try the below in the search string:

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

Highlighted
Not applicable

Re: Select in field based on variable condition

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,

Highlighted
sinanozdemir
Valued Contributor III

Re: Select in field based on variable condition

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

Highlighted
Not applicable

Re: Select in field based on variable condition

For vGDP ? Its sum.

Highlighted
sinanozdemir
Valued Contributor III

Re: Select in field based on variable condition

Let's try the below:

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


Thanks

View solution in original post

Highlighted
Not applicable

Re: Select in field based on variable condition

Perfect! Thank you so much!

Highlighted
sinanozdemir
Valued Contributor III

Re: Select in field based on variable condition

You are welcome.