Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
ckandemir
Contributor
Contributor

Lookup values from other (talbes)sections

Hi everyone,

I have two tables which are in other sections. (CustomersTable & ProgramTable)

CustomersTable:

CustomerID,Birth_Date

ProgramTable:

CustomerID, ProgramID,ProgramStartDate

I want to add Birt_Date values to ProgramTable.

I' ve used lookup function as below but, it isn't worked.

It said me " Field "Birth_Date" not found."

Lookup("Birth_Date","CustomerID","CustomerID","CustomersTable") As CustomersBirthDate

Could you please help me 🙂

 

Labels (1)
1 Solution

Accepted Solutions
jochem_zw
Employee
Employee

It should be something like this:

MapBirthdate:
Mapping Load
CustomerID,
Birth_Date
From ....................

CustomersTable:
Load
CustomerID,
Birth_Date
From ....................

ProgramTable:
Load
CustomerID,
ProgramID,
ProgramStartDate,
ApplyMap('MapBirthdate',CustomerID,null()) as CustomerBirthDate
From ....................

After this there should be a new field 'CustomerBirthDate' in the ProgramTable.

GL

View solution in original post

3 Replies
jochem_zw
Employee
Employee

Applymap is faster, so why not use this? Did you load the CustomerTable first?

ckandemir
Contributor
Contributor
Author

Yes, I loaded CustomerTable first.

I have already used an other ApllyMap function for another value.

I could not handle using two Apllymap function.

May code black text and it is worked.

I tried to add red text in my code, it wasn't worked.

 

Table1:
MAPPING Load

ID  ,
SOURCE_ID;
FROM .......;

CustomerTable:
MAPPING Load
CustomerID",
BIRTH_DATE;
FROM ......;

LOAD .....,

jochem_zw
Employee
Employee

It should be something like this:

MapBirthdate:
Mapping Load
CustomerID,
Birth_Date
From ....................

CustomersTable:
Load
CustomerID,
Birth_Date
From ....................

ProgramTable:
Load
CustomerID,
ProgramID,
ProgramStartDate,
ApplyMap('MapBirthdate',CustomerID,null()) as CustomerBirthDate
From ....................

After this there should be a new field 'CustomerBirthDate' in the ProgramTable.

GL