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: 
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
Partner Ambassador
Partner Ambassador

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
Partner Ambassador
Partner Ambassador

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
Partner Ambassador
Partner Ambassador

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