Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
helen_pip
Creator III
Creator III

Excluding Null & unrequired values from a list box

Dear Qlikview user

With the help of the community I have a list of values I want to exclude from a list box, by using Wildmatch

=If(WildMatch(Care_Group,'Division*'), 0, Care_Group)

However when I select from the List Box there is an empty value at the bottom, where the user still has the ability to make the selection

See Attached Example

I now feel as though I need to wrap another function around my statement in order to suppress the values I want excluded

Could someone kindly help me with the following statement so that I can suppress the values I want to exclude

Neither of these work:

=If(IsNull(WildMatch(Care_Group,'Division*')), 0, Care_Group)

=If(Len(WildMatch(Care_Group,'Division*')),0)>0,Care_Group)

Could someone kindly advise?

Kind Regards

Helen

1 Solution

Accepted Solutions
sunny_talwar

How about this:

=If(Len(Trim(Care_Group)) = 0 or WildMatch(Care_Group,'Division*'), Null(), Care_Group))

View solution in original post

5 Replies
sunny_talwar

So you want the empty space to go away or become 0?

If it needs to go away, then try this:

=If(Len(Trim(Care_Group)) > 0,

  If(WildMatch(Care_Group,'Division*'), 0, Care_Group))

If it needs to become part of 0, then may be this:

=If(Len(Trim(Care_Group)) > 0 or WildMatch(Care_Group,'Division*'), 0, Care_Group))

narendiran
Partner - Creator
Partner - Creator

Hi Helen,

Try this

=If(len(If(WildMatch(Care_Group,'Division*'), 0, Care_Group))>0,Care_Group)

helen_pip
Creator III
Creator III
Author

Hello again Sunny!

Thank you for spending the time to help me

Your first suggestion just gives me an empty value option at the bottom of the list box, which will enable the user to still make a selection

=If(Len(Trim(Care_Group)) > 0,

  If(WildMatch(Care_Group,'Division*'), 0, Care_Group))

Your second suggestion, only returns a 0

=If(Len(Trim(Care_Group)) > 0 or

WildMatch(Care_Group,'Division*'), 0, Care_Group))


I would like it so the 0 dissapears from the list box and I want the empty space to go away

Do you kindly have any other suggestions?


Kind Regards

Helen


sunny_talwar

How about this:

=If(Len(Trim(Care_Group)) = 0 or WildMatch(Care_Group,'Division*'), Null(), Care_Group))

helen_pip
Creator III
Creator III
Author

Thanks Sunny T

This works for me

Thanks for all your help

Kind Regards

Helen