Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to split column value in to multiple column values


Hi,

Please find attached. Could anyone help me how to split the Address column so that I need to have below columns in Straight table.

Address1, Address2, Address3, Town,County,Postcode.

I tried using Subfield function but it is not showing correct values.

Thanks in advance.

8 Replies
marcus_sommer

If your address-column always equally structured subfield is the proper functions:

....

subfield(AddressColumn, ',', 1) as Adress1,

subfield(AddressColumn, ',', 2) as Adress2

....

- Marcus

Not applicable
Author

Thanks Marcus.

But the address column is not equally structured that's the problem I was facing now. Please any help.


marcus_sommer

Then you need some checks (length, char-count, purgechar/keepchar, wildmatch/index, mid ...) for each subfield, perhaps nested in if-loops. Is there are only a few possibilities is it simply, if not you need some time for complicated routines ... Sometimes is it better to ask for a better data-sources ...

- Marcus

Not applicable
Author

Thanks and any example for purgechar/keepchar please?

Nicole-Smith

See the attached.

Not applicable
Author

Thanks but I need postcode not to split i,e I should have postcode as WA4 1ER.

Please help how to get this.

Nicole-Smith

See the attached.  I'm not sure how your addresses are set up as they look different from what I'm used to, so you may have to do some other configurations on your own.  The base of what you need is there.

Not applicable
Author

Thanks will try and let you know.