Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Text box - if else

Dear community,

I want to display the region name if the field in region is selected, if none of them is selected, it will show "blabla".

There are 7 items in the field, if 2 of them are selected, the text box will show 2 items.

However, expression below seems like not working:

Kindly help.

Thanks and best regards,

Chanel

1 Solution

Accepted Solutions
Highlighted
Not applicable

Re: Text box - if else

Dear Aurélien,

It is working after i added "distinct". Thanks for your awesome idea!

=If(getSelectedCount(Region)>0,

         Concat(distinct Region, ' - '),

         'blabla'

        )

Thanks and best regards,

Chanel

View solution in original post

5 Replies
Highlighted
Partner
Partner

Re: Text box - if else

Hi Chanel,

Try : If(getSelectedCount(Region)>0,

         Concat(Region, ' - '),

         'blablabla'

        )

Regards,

Aurélien

Highlighted
Not applicable

Re: Text box - if else

use Qlikview function "getfieldselections"


=if(GetFieldSelections(SUBSCRIBER_KEY_NUM)=27,'blabla','NO!')

extrapolate

good luck.

Highlighted
Not applicable

Re: Text box - if else

Hi Aurélien,

Thanks for your fast response!

it is working well when nothing is selected:

but when i selected something from the field:

Example: Australia/NZ

Thanks and best regards,

Chanel

Highlighted
Not applicable

Re: Text box - if else

Dear Aurélien,

It is working after i added "distinct". Thanks for your awesome idea!

=If(getSelectedCount(Region)>0,

         Concat(distinct Region, ' - '),

         'blabla'

        )

Thanks and best regards,

Chanel

View solution in original post

Highlighted
Not applicable

Re: Text box - if else

try this:

=if(isnull(GetFieldSelections(SUBSCRIBER_KEY_NUM)),'blabla',GetFieldSelections(SUBSCRIBER_KEY_NUM,'; ' , 10))