Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

How to filter HAKKO customer ?

Hi Sir


I have product field.

inside the product field it have data

Hakko

Hakko/Beckhoff

Hakko/Beckhoff/Mitsubishi


May i know how to create


a new field name "Hakko_User" to list those who customer interested in "Hakko"

a new field name "Beckhoff_User" to list those who customer interested in "Beckhoff"


So that i can easily filter out Hakko user.



Paul

1 Solution

Accepted Solutions
kenphamvn
Creator III
Creator III

Hi

Sorry i missed comma in expression

please try again

LOAD

    COL_1,

    if (SubStringCount ( COL_1, 'Hakko' ) >0, 'Hakko','No Hakko') as Hakko_User,

    if (SubStringCount ( COL_1, 'Beckhoff' ) >0, 'Beckhoff','No Beckhoff') as Beckhoff_User

Resident tablename;

Regards

An Pham

View solution in original post

9 Replies
paulyeo11
Master
Master
Author

product table.png

kenphamvn
Creator III
Creator III

Hi

Using Index or substringcount function

Ex:

if (SubStringCount ( [product field], 'Hakko' ) >0 'Hakko','No Hakko') as Hakko_User


if (SubStringCount ( [product field], 'Beckhoff' ) >0 'Beckhoff','No Beckhoff') as Beckhoff_User


Regard

An Pham



paulyeo11
Master
Master
Author

Hi Pham

I get error msg :-

Error in expression:

')' expected

Thank you for your help.

Paul Yeo

kenphamvn
Creator III
Creator III

Hi

Sorry i missed comma in expression

please try again

LOAD

    COL_1,

    if (SubStringCount ( COL_1, 'Hakko' ) >0, 'Hakko','No Hakko') as Hakko_User,

    if (SubStringCount ( COL_1, 'Beckhoff' ) >0, 'Beckhoff','No Beckhoff') as Beckhoff_User

Resident tablename;

Regards

An Pham

prma7799
Master III
Master III

missing comma

if (SubStringCount ( [product field], 'Hakko' ) >0  , 'Hakko','No Hakko') as Hakko_User


if (SubStringCount ( [product field], 'Beckhoff' ) >0 , 'Beckhoff','No Beckhoff') as Beckhoff_User

paulyeo11
Master
Master
Author

Thank you PM.

paulyeo11
Master
Master
Author

Hi Pham

Can you share with me how you paste those script on your reply ? After you paste the back ground have line number 1 to 5.

Paul

kenphamvn
Creator III
Creator III

Hi

Using Advanced Editor and format code

1-18-2018 2-07-43 PM.png

Regards

An Pham

paulyeo11
Master
Master
Author

sub

wow this is very useful

thank you for sharing with me

end