Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
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
Specialist

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

View solution in original post

henrikalmen
Specialist
Specialist

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
Partner - Master

=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
Specialist

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

BrunPierre
Partner - Master
Partner - Master

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
Specialist

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
Specialist

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
Partner - Master

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