Qlik Community

App Development

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

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator 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
crusader_
Partner
Partner

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

chooco_co
Partner
Partner

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

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

chooco_co
Partner
Partner

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
Creator II
Creator II
Author

Thanks Both of You