Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
tom2qlik
Creator
Creator

Merge one field into another

Hi all,

I am trying to move values from one field into another.  Currently I have my dataset looking like below:

This table is created by left joining on number with the pulling field being location2.

I want to move the values from location2 into the location field.  

   

NumberPalletLocationLocation2
11aaaLondon
11aabLondon
11aabLondon
2 Paris
22fbb Paris
22fbb Paris
22fbb Paris
33SabMadrid
33SadMadrid

Thanks,

Tom

1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi,

This will give you required output.

LOAD Number,

     Pallet,

     if(isnull(Location),Location2,Location) as  Location,

     Location2

FROM

(ooxml, embedded labels, table is Sheet1);

Thanks

Paridhi

View solution in original post

3 Replies
Anonymous
Not applicable

Hi,

This will give you required output.

LOAD Number,

     Pallet,

     if(isnull(Location),Location2,Location) as  Location,

     Location2

FROM

(ooxml, embedded labels, table is Sheet1);

Thanks

Paridhi

prma7799
Master III
Master III

Try this....

Test:

LOAD * Inline [

Number ,Pallet,Location, Location2

1 ,1aaa ,London ,

1 ,1aab ,London ,

1 ,1aab ,London ,

2 , , ,Paris

2 ,2fbb , ,Paris

2 ,2fbb , ,Paris

2 ,2fbb , ,Paris

3 ,3Sab ,Madrid ,

3 ,3Sad ,Madrid ,

]

;

TestNew:

LOAD Number ,Pallet

,

if( len(trim(Location))= 0 , Location2 ,Location ) as NewLoc

Resident Test ;

drop Table Test;

sunny_talwar

If only one or the other will ever have a value, you can just do this

Location & Location2 as Location