Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
vvvvvvizard
Partner - Specialist
Partner - Specialist

Applymap one to many

"Whenever there is a one to many relationship between tables then a separate table must be loaded into the data model instead of using a mapping table and applymap."


Ive read the existing threads and tested using an example and the above statement doesnt make sense.


As long as the mapping function values are distinct the other table can have duplicate values, they will be correctly mapped. So a 1 to many relationship does work. It wont work on many to many relationship or on a one to many only if the mapping function values are the many. As long as the mapping function values are distinct the function will work correctly.


Eg maptable:

Load * in line [

A

One

Two

Three

] ;


If the table being mapped to has many 1, 1, 1, it will still work, so one to many works just depends on which table is the many, the maptable cant be the many.

Correct me if im wrong




1 Solution

Accepted Solutions
avinashelite

if I understood properly ..you have a mapping table with distinct value s i.e. 1:1 relation and if your fact/calling table has 1:M then your totally rite here

View solution in original post

2 Replies
pradosh_thakur
Master II
Master II

Hi Yusuf

The way I VIEW it one to many in mapping table doesn't make SENSE.

Anyways coming back to your question

Applymap should be used when there is one to one relationship in the mapping table or else apply map will only pick the first matching record. You can create duplicate record though by using some other functions like subfield,concat etc but that wont make much SENSE.

here is some link for you to go through.

https://community.qlik.com/thread/147241?_ga=2.107238274.1456937817.1514696311-1643433312.1498286902

https://community.qlik.com/docs/DOC-17760

Learning never stops.
avinashelite

if I understood properly ..you have a mapping table with distinct value s i.e. 1:1 relation and if your fact/calling table has 1:M then your totally rite here