Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
arsenal1983
Creator
Creator

loading values from field

Hello,

In my source data I have field which contains values separated by comma is there any chance to do the list from such value?

Example:

I Have:

 

GROUP_1AFRICA, EUROPE
GROUP_2ASIA
GROUP_3EUROPE, ASIA

I need to have:

 

GROUP_1AFRICA
GROUP_1EUROPE
GROUP_2ASIA
GROUP_3EUROPE
GROUP_3ASIA
1 Solution

Accepted Solutions
ali_hijazi
Partner - Master II
Partner - Master II

yes you can use Subfield

Load Filed1, subfield(Field2,',') as Field2

from source table...

I can walk on water when it freezes

View solution in original post

5 Replies
ali_hijazi
Partner - Master II
Partner - Master II

yes you can use Subfield

Load Filed1, subfield(Field2,',') as Field2

from source table...

I can walk on water when it freezes
avinashelite

yes its possible , use the subfield function

subfield(field_name,',') as new_field

sunny_talwar

Sample for your requirement:

Table:

LOAD Group,

  SubField(Country, ', ') as Country;

LOAD * Inline [

Group|Country

GROUP_1|AFRICA, EUROPE

GROUP_2|ASIA

GROUP_3|EUROPE, ASIA

] (delimiter is |);


Capture.PNG

Kushal_Chawda

try this

LOAD Group,

          subfield(Country,',') as Country

From Table

Ralf-Narfeldt
Employee
Employee

Yes, with the SubField() function. It will split a field based on a delimiter.

If the field is called REGIONS use:

SubField(REGIONS,',') As REGION

This will create 2 records for the value AFRICA, EUROPE with AFRICA and EUROPE in new field REGION

SubField ‒ QlikView