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: 
daveatkins
Partner - Creator III
Partner - Creator III

is there a function to un-concat a field during data load?

example source input data:

sales person, regions

Dave, "North, West"

desired load is 2 rows:

sales person, region 

Dave, North

Dave, West

This is the opposite function of concat(region,',')

purpose is to simplify data entry spreadsheet so users do not have to create multiple rows

Labels (1)
1 Solution

Accepted Solutions
Kushal_Chawda

@daveatkins  subfield is the function for you

load person, 
     subfield(regions,',') as region
FROM Source;

View solution in original post

3 Replies
edwin
Master II
Master II

there is no unconcatenate function, the closest is subfield.  as there is no indication how many components will be needed, i suggest use combination of subfield and the cosstab feature:

data:
load person, subfield(regions,',',1) as region1, subfield(regions,',',2) as region2;
load 'Dave' as person, 'North,West' as regions
AutoGenerate(1);

newData:
//load person, Region;
crosstable(regionType, region)
load * resident data;

drop table data;
data:
load person, region resident newData;

drop table newData;

the first part is just to start the data table but you will not need that and just point to your table.

Kushal_Chawda

@daveatkins  subfield is the function for you

load person, 
     subfield(regions,',') as region
FROM Source;
hjimenez
Employee
Employee

Hi @daveatkins,

Please try this:

Table1:
Load * Inline [
Sales person, regions
Dave, "North, West"
];

FinalResult:
NoConcatenate
Load
[Sales person],
SubField(regions,',') as region
Resident Table1;
Drop Table Table1;

Regards,
Hector