Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
paulyeo11
Valued Contributor II

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
Contributor III

Re: How to filter HAKKO customer ?

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

9 Replies
paulyeo11
Valued Contributor II

Re: How to filter HAKKO customer ?

product table.png

kenphamvn
Contributor III

Re: How to filter HAKKO customer ?

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
Valued Contributor II

Re: How to filter HAKKO customer ?

Hi Pham

I get error msg :-

Error in expression:

')' expected

Thank you for your help.

Paul Yeo

kenphamvn
Contributor III

Re: How to filter HAKKO customer ?

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
Honored Contributor III

Re: How to filter HAKKO customer ?

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
Valued Contributor II

Re: How to filter HAKKO customer ?

Thank you PM.

paulyeo11
Valued Contributor II

Re: How to filter HAKKO customer ?

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
Contributor III

Re: How to filter HAKKO customer ?

Hi

Using Advanced Editor and format code

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

Regards

An Pham

paulyeo11
Valued Contributor II

Re: How to filter HAKKO customer ?

sub

wow this is very useful

thank you for sharing with me

end

Community Browser