Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to separate the text value into one by one?

hi all,

I have a address column with comma separated values like  The Business Centre,61 Wellfield Road,Roath,Cardiff

Can i separate this values into one by one with comma like,

The Business Centre,

61 Wellfield Road,

Roath,

Cardiff

If possible Can anyone explain how can i do this?

Regards,

Mani

Labels (1)
1 Solution

Accepted Solutions
MarcoWedel
MVP
MVP

Replace(Address,',',','& Chr(10))

Regards

Marco

View solution in original post

6 Replies
Anil_Babu_Samineni
MVP
MVP

Yes, you can

Concat(fieldname,',',chr(10)) as newfield

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar
MVP
MVP

I think all you need is this

LOAD SubField(FieldName, ',') as NewField

Read here about SubField function:

The Secret Life of SubField

MarcoWedel
MVP
MVP

Hi,

if you really want to keep the trailing comma, then one solution could be:

QlikCommunity_Thread_236950_Pic1.JPG

LOAD *,

    Replace(SubField(Replace(Address,',','@comma@,'),','),'@comma@',',') as AddressSubstring

INLINE [

    Address

    "The Business Centre,61 Wellfield Road,Roath,Cardiff"

    "QLIKTECH UK LTD, 1020 Eskdale Road, Winnersh, Wokingham, Berkshire"

];

hope this helps

regards

Marco

Anonymous
Not applicable
Author

Use replace() and replace comma "," value to get your result .

Thanks,

Not applicable
Author

Hi  Marco Wedel thanks for reply...

This is my expected result but it is not working in text box and this script gets the values in ascending order like,

61 Wellfield Road,

Cardiff

The Business Centre,

Roath,


i want the actual result is showing in text box,,,,


Thanks,

Mani


MarcoWedel
MVP
MVP

Replace(Address,',',','& Chr(10))

Regards

Marco