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

How to split below requirement.

Hi ,

Could you please help me out to split below city field into two part like city and pin code

CITY
REET  KARAIKAL-309602. Pondi
REET  KARAIKAL-609602. . Pondi
,  PUDUCHERRY-605010 west
,  PUDUCHERRY-605010 west
COIMBATORE-641006 CMB
COIMBATORE-641018
COIMBATORE-641018
METTUPALAYAM-641301 MTP
METTUPALAYAM-641302

 

 

Ouput:    
City   PinCode
REET  KARAIKAL   609602
PUDUCHERRY   605010
COIMBATORE   641006
COIMBATORE   641018
METTUPALAYAM   641301
METTUPALAYAM   641302
Labels (2)
4 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I can suggest a couple of approaches.

If the only numbers are the PIN code you can use:

KeepChar(CITY, '0123456789')

If you could have numbers elsewhere you could get the data after the "-"

KeepChar(TextBetween(CITY,'-',' '), '0123456789')

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

Naps_230
Creator
Creator
Author

Hi ,

Its working for Pincode only, But i need both city and pin code like in below.

 

City   PinCode
REET  KARAIKAL   609602
PUDUCHERRY   605010
COIMBATORE   641006
COIMBATORE   641018
METTUPALAYAM   641301
METTUPALAYAM   641302
Frank_S
Support
Support

Perhaps you can try using the 'split' card in the 'Data Manager'

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
vidyutverma
Partner - Contributor III
Partner - Contributor III

Hi, You should be able to do this using a combination of string functions [ subfield and purgechar ]. I don`t want to rob you of fun of solving this one 🙂