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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to split an address block into two fields

I am importing data from a software that stores Address Lines as a "block" separated by a new line, rather than as separate fields. How can I separate the address lines into separate fields when I don't have a comma as a delimiter? 

Currently, when I import the "AddressBlock" field into QV, I only see the top line of the address line displayed, but if I export it into excel, I can see both lines displayed in a single cell, but on two separate lines just as they appear in the original software.

2 Replies
PradeepReddy
Specialist II
Specialist II

try something like this...

Load *,
subfield(AddressBlock,chr(10),1) as Adr_Block,
subfield(AddressBlock,chr(10),2) as Adr_Line1
From Table1;

Change the subfield positions (1,2) according to your data format.

MarcoWedel

please post some sample data and your expected result

thanks

Marco