Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
rupaliqlik
Creator
Creator

Split the string

Hi Experts,

I have a field which contain code and desc together.I want to separate the string and convert it into Code and Desc.With the help of sunfield I can fetch code but there are multiple spaces that is why I can't fetch Desc  .

Example

1011700 CareFusion Australia 316 Pty Ltd -  
1011702 CFN New Zealand 313 Ltd

Output:

Code:1011700

Desc CareFusion Australia 316 Pty Ltd

Code :1011702

Desc:CFN New Zealand 313 Ltd 

kaushik.solanki 

 

Labels (1)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

Try this

 

Subfield(input, ' ',1) as code,

Mid(input, Index (input, ' ')+1) as desc

View solution in original post

2 Replies
Vegar
MVP
MVP

Try this

 

Subfield(input, ' ',1) as code,

Mid(input, Index (input, ' ')+1) as desc

rupaliqlik
Creator
Creator
Author

Thanks