Discussion board where members can get started with QlikView.
I need to use Apply Map and populate 'ID' column using the two tables based on these conditions.
1. If 'ID' in Table A is blank, then fill it with 'ID' from Table B
2. If 'ID' in Table A has a value, replace it with 'ID' from Table B
3. If 'ID' in Table A has a value and 'ID' in Table B is null, then use the value from table A.
I have tried
if(len(ID) > 0, ID, ApplyMap('NameIdMap', Name)) as ID
Applymap('fieldmap',Name,ID) as ID1,
if(ID>0,ID,Applymap('fieldmap',Name) ) as ID2;
But they are failing the 3rd condition I have here.
here is the solution
try the below condition in script(note:Change your map table name)
If(Len(ApplyMap('FillmapTableB',Name))<>0,ApplyMap('FillmapTableB',Name,ID),ID) As ID
View solution in original post
have a look at this
Mapping load * inline [
Applymap('fieldmap',Name,ID),ID) as ID;
load * Inline [
@lironbaram Hi, this might work. Let me try. Thank you. But what happens when the ID is alphanumeric?
and this gives me blank values