Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
richardouellett
Creator
Creator

Filter Chart Expression Sum(If(Name='J*',1,0) Doesn't Work?

Good Morning

I have a simple chart with 1 expression above trying to tabulate 1st name counts based on the 1st Initial; typical 1st name fields are  John, Jane, Susan, Linda, Richard etc.  Can you suggest work around?  I also need to filter using Sum(If(Name<>'J*',1,0).

As an FYI Sum(If(Name Like 'J*',1,0) works but I  still would not have a solution for Sum(If(Name<>'J*',1,0). Can you help?

Thank!

Rick

1 Solution

Accepted Solutions
swuehl
MVP
MVP

If you want to get the result for not equal, you can use the NOT operator or just change the then / else branch assignments:

Sum(If(Name LIKE 'J*',0,1))


Sum(If(not Name LIKE 'J*',1,0))

View solution in original post

3 Replies
swuehl
MVP
MVP

Wildcards can only be used in combination with some functions / operators, like

Name Like 'J*'

or

WildMatch( Name, 'J*')

Another option could be

Left(Name,1) = 'J'

swuehl
MVP
MVP

If you want to get the result for not equal, you can use the NOT operator or just change the then / else branch assignments:

Sum(If(Name LIKE 'J*',0,1))


Sum(If(not Name LIKE 'J*',1,0))

richardouellett
Creator
Creator
Author

Thank you Stefan for the quick response!