Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Not applicable

Creating Age Field from Two Different Tables

Hi all!

I am trying to figure out how to create an age field in the load script based on how old participants where when they registered for an event. I have two tables, event and participant. I need to use the Begin_Date in the event table and the DOB in the participant table to calculate age, but I'm struggling on how to pull those two fields out to use them.

I've tried mapping but haven't had success yet. I get an error message that 'Generic tables must contain at least 3 fields'. I've tried taking off the brackets [ ] but that didn't work.

This is what I have so far, but if anyone knows a simpler or better way to do it, that would be great!


mapping Load


resident event;


mapping load


age(ApplyMap('BeginDateMap',Begin_Date,0),[DOB]) as PartAge

resident participant;

Tags (3)
1 Reply

Re: Creating Age Field from Two Different Tables

A mapping table must have two (and only 2) fields in order to work.



mapping load



resident some_table;

load *,

applymap('mapTest', lookup, null()) as new_mapped_field......