Qlik Community

Qlik Sense App Development

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

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
Highlighted
upaliwije
Not applicable

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
crusader_
Not applicable

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

chooco_co
Not applicable

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

 

3 Replies
crusader_
Not applicable

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

chooco_co
Not applicable

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

 

upaliwije
Not applicable

Re: To break a field value

Thanks Both of You