Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Not applicable
Author

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
Aurelien_Martinez
Partner - Specialist II
Partner - Specialist II

Hi Chanel,

Try : If(getSelectedCount(Region)>0,

         Concat(Region, ' - '),

         'blablabla'

        )

Regards,

Aurélien

Help users find answers! Don't forget to mark a solution that worked for you!
Not applicable
Author

use Qlikview function "getfieldselections"


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

extrapolate

good luck.

Not applicable
Author

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

Not applicable
Author

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

Not applicable
Author

try this:

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