Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
upaliwije
Contributor II

To break a field value

Hi Friends

 

I have following data in a column

 

MAKE_MODEL

TOYOTA AURIS
TOYOTA AT-211
TOYOTA AT211
TOYOTA AQUA-DAA-NHP10
TOYOTA AQUA G HYBRID
TOYOTA AQUA
TOYOTA ALTEZZA
TOYOTA ALPHARD

I want to split it into two columns as shown below

MAKEMODEL
TOYOTAAURIS
TOYOTAAT-211
TOYOTAAT211
TOYOTAAQUA-DAA-NHP10   
TOYOTAAQUA G HYBRID    
TOYOTAACQA
TOYOTAALTEZZA
TOYOTAALPHARD

 

Kindly help me to do it in my data load script 

 

2 Solutions

Accepted Solutions
Partner
Partner

Re: To break a field value

Hi,

try below:

left(MAKE_MODEL,index(MAKE_MODEL,' ',1)-1) AS MAKE

mid(MAKE_MODEL,index(MAKE_MODEL,' ',1)+1) AS MODEL

Hope this helps

//Andrei

View solution in original post

Partner
Partner

Re: To break a field value

Hi 

You can use subfield function. example subfield(MAKE_MODEL,' ' ,1) as MAKE,  subfield(MAKE_MODEL,' ' ,2) as MODEL.

More info:

SubField(text, delimiter[, field_no ])

https://help.qlik.com/en-US/sense/February2019/Subsystems/Hub/Content/Sense_Hub/Scripting/StringFunc...

 

Thanks

 

View solution in original post

3 Replies
Partner
Partner

Re: To break a field value

Hi,

try below:

left(MAKE_MODEL,index(MAKE_MODEL,' ',1)-1) AS MAKE

mid(MAKE_MODEL,index(MAKE_MODEL,' ',1)+1) AS MODEL

Hope this helps

//Andrei

View solution in original post

Partner
Partner

Re: To break a field value

Hi 

You can use subfield function. example subfield(MAKE_MODEL,' ' ,1) as MAKE,  subfield(MAKE_MODEL,' ' ,2) as MODEL.

More info:

SubField(text, delimiter[, field_no ])

https://help.qlik.com/en-US/sense/February2019/Subsystems/Hub/Content/Sense_Hub/Scripting/StringFunc...

 

Thanks

 

View solution in original post

upaliwije
Contributor II

Re: To break a field value

Thanks Both of You