Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Every one,
is
is applymap() allowing duplicates? why? what is the final result? can any one answer me please
Could you, please, provide more information about your issue or an example? You can load the mapping using distinct function to not allow duplicates. However, I think that, when doing the applymap it will depend on the table you are doing it. I mean, if that table has duplicates, the applymap will be duplicated too.
Kind Regards
Daniel
applymap does not create duplicates however it allows map table to contain duplicates. It picks first value from the mapping table which matches the map.
so assuming you have mapping tables like below
map_from, map_to
a, 1
a, 2
the result of mapping value a will be 1 as that is the first value in mapping table.
You may also think about applymap as of vlookup equivalent.
cheers
Mapping load is Row-by-Row Execution , when the main table is loaded, Qlik checks the mapping table for every single row. If the key field in your main table is 'A',
ApplyMap() finds the corresponding value in the map table and returns it.
If mapping table duplicate values for ID, data returns only for first value.
example:
ID, to_map
100, A
100, B
the result of mapping value will be A. (if it is first record B the result of mapping value will B)