Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
qvraj123
Creator II
Creator II

Mapping Table with duplicates - looking for options before going to left join

Hi All,

Thanks for your time - I have a scenario where i am trying to avoid a left join by using the mapping table but i noticed that i have duplicates in my mapping load -  this is how it looks like in my mapping table

COMPID - This field is PK in this table so has unique values - 

FK_REPID - This field is FK so has duplicate values

ID - This field has unique values

FK_COMPID - This field has unique values - i need this field later on to join with some other table

 

Capture2.PNG

 

my Mapping table looks like this

MapTable1:
Mapping LOAD
FK_REPID       AS Id,
COMPID & '|' & FK_COMPID & '|' & Id   AS ComAttribues;

The driver table in which I have Id field has only unique Id's

for the above FK_REPID there is only 1 row/record in the driver table

when I use the subfield to get the list of columns i am only getting ONE row with values for those fields..I do not get the all the different COMPIDs ..

in the mapping table for this FK_REPID (B30E6EBE-16AC-4540-ADEE-8F2E19E33B9E) i have multiple rows with different COMPIDs,IDs and FK_COMPIDs -

I tried to concatenate this fields in the mapping table so that i can use the subfield like

Subfield(ApplyMap('MapTable1', Id, 'Not Found' ), '|',1) AS CompDimId

This is giving me only 1 row may be the last value - is there any option to avoid the LEFT JOIN in this scenario

please i really appreciate your help

Thanks a lot

 

 

Capture3.PNG

1 Solution

Accepted Solutions
rwunderlich

Why do you want to avoid the left join? It seems to be the appropriate statement for this case.

-Rob

View solution in original post

2 Replies
rwunderlich

Why do you want to avoid the left join? It seems to be the appropriate statement for this case.

-Rob

View solution in original post

qvraj123
Creator II
Creator II
Author

Thank you Box, you are right.. Mapping table is not the choice for me in this scenario