Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
JFDemers
Contributor III
Contributor III

Help with Chart Expression - Exclude records

Hi,

I am trying to exclude records for which their AccountCode starts with a specific string (5*,6*,40* etc.). I tried multiple ways but could not make it work.

I tried:

=IF((AccountClientType='Institutional' OR AccountClientSubType='Private Wealth')
AND AccountCode <> '5*',
AccountDisplayCodeName)

=IF((AccountClientType='Institutional' OR AccountClientSubType='Private Wealth')
AND NOT MATCH(AccountCode,'5*','6*'),
AccountDisplayCodeName)

Thx for the help!

Labels (1)
3 Solutions

Accepted Solutions
henrikalmen
Specialist II
Specialist II

use WILDMATCH instead of MATCH in your second example. Match doesn't accept wildcards (*) but wildmatch does.

View solution in original post

henrikalmen
Specialist II
Specialist II

When using wildcards in set expression, you need to enclose the values with double quotes instead of single quotes: "5*" and not '5*'.

View solution in original post

BrunPierre
Partner - Master II
Partner - Master II

=COUNT({<AccountClientType={'Institutional'},AccountCode -= {"9*"}>} DISTINCT AccountCode) +
COUNT({<AccountClientSubType={'Private Wealth'},AccountCode -= {"5*", "6*","40*","48*","49*"}>} DISTINCT AccountCode)

View solution in original post

8 Replies
henrikalmen
Specialist II
Specialist II

use WILDMATCH instead of MATCH in your second example. Match doesn't accept wildcards (*) but wildmatch does.

BrunPierre
Partner - Master II
Partner - Master II

Hi

May be like this in set analysis

{<AccountCode -= {"5*", "6*","40*", .... and so on}>}

JFDemers
Contributor III
Contributor III
Author

Works like a charm! Thx a lot!

henrikalmen
Specialist II
Specialist II

Great!

It's always a good idea to click the "accept as solution" button when a question has recieved a correct answer.

JFDemers
Contributor III
Contributor III
Author

I actually need set analysis for another expression and this one is not working either. I am trying to count the number of records with these parameters:

 

=COUNT({<AccountClientType={'Institutional'},AccountCode -= {'9*'}>} DISTINCT AccountCode) +
COUNT({<AccountClientSubType={'Private Wealth'},AccountCode -= {'5*', '6*','40*','48*','49*'}>} DISTINCT AccountCode)

henrikalmen
Specialist II
Specialist II

When using wildcards in set expression, you need to enclose the values with double quotes instead of single quotes: "5*" and not '5*'.

JFDemers
Contributor III
Contributor III
Author

Thx again!

Still learning the syntax. Might have missed that detail in the documentation.

BrunPierre
Partner - Master II
Partner - Master II

=COUNT({<AccountClientType={'Institutional'},AccountCode -= {"9*"}>} DISTINCT AccountCode) +
COUNT({<AccountClientSubType={'Private Wealth'},AccountCode -= {"5*", "6*","40*","48*","49*"}>} DISTINCT AccountCode)