Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
manoranjan_d
Specialist
Specialist

mapping table has two values

Hi while doing mapping load suppose if the table  T1 has two values for the specific field "A" wht will happen while doing doing apply map on T2 and how we can avoid this duplicates and wht is solution for this scenario

T1:

AB
1A
1B
2C
3D
3E
4F

T2:

AC
1A
2C
3D
4F

MAP:

MAPPING LOAD

A,

     B

FROM

(ooxml, embedded labels, table is Sheet1);

T2:

LOAD A,

     C,

     ApplyMap('MAP',A) as B

FROM

(ooxml, embedded labels, table is Sheet1);

i got an output as:

  

ABC
1AA
2CC
3DD
4FF

since it taking the first value if it being duplicate

4 Replies
olivierrobin
Specialist III
Specialist III

hello

as applymap() returns ONE value, the question is : which one do you want to retrieve ?

and so add some logic in the mapping load to load only one row

manoranjan_d
Specialist
Specialist
Author

can you please explain the logic to load only one row

olivierrobin
Specialist III
Specialist III

mapping load A,maxstring(B) as B

group by A

or any function you want returning only a single value

tamilarasu
Champion
Champion

Or try,

MAP:

MAPPING LOAD

    A,

    B

FROM

(ooxml, embedded labels, table is Sheet1) where Not Exists (A);