Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Script calculation issue

table1:

  customerid ,bookingloc, deliverloc

  100                1                  2

table2:

  locid     locname

  1          bangalore

  2           chennai

how i can achieve below output as w/o null records

  customerid  bookingloc  deliveryloc

  100              bangalore     chennai

10 Replies
Anonymous
Not applicable
Author

use applymap:

Table2:

mapping load

locid, locname

from ..

table1:

load customerid,

applymap('Table2', bookingloc) as bookname,

applymap('Table2', deliverloc) as delivername

from

marcus_sommer

You could use mapping with applymap() for this, see: Mapping … and not the geographical kind.

- Marcus

maxgro
MVP
MVP

or add a table

table1:

load * inline [

  customerid ,bookingloc, deliverloc

  100,                1,                  2 

  200,                2,                  1 

];

table2:

load locid as bookingloc, locname inline [

  locid ,    locname

  1,          bangalore

  2 ,          chennai

]; 

table3:

load bookingloc as deliverloc, locname as deliverlocname resident table2;

Not applicable
Author

Hi Rudolf,

   We don't have Common Key column...How you will map the table....Can you Please explain....

Thanks & Regards

Raja

Kushal_Chawda

Do simple inner join

load customerid ,

bookingloc,

deliverloc

From table1

inner join

load locid as deliverloc,

locname as deliveryloc

From Table2

Anonymous
Not applicable
Author

that's how applymap works. just test my solution. you donot Need a common key.

you give bookingloc as Input tp applymap and get bookingname,

same with deliverloc

try it

Not applicable
Author

Hi,

find the attachment.

qlikviewwizard
Master II
Master II

Good one

senpradip007
Specialist III
Specialist III

Have a look at the attachment. Hope it will help you.