# Qlik Healthcare User Group

This group is for healthcare organizations, partners, and Qlik Healthcare staff to collaborate and share insights.

Highlighted
New Contributor III

## 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

Tags (1)
1 Solution

Accepted Solutions
MVP

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

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))

3 Replies
MVP

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

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'

MVP

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

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))

New Contributor III

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

Thank you Stefan for the quick response!