Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

Multi Field to Single Field Relationship ?

Dear Qlik Master,

I have a transaction table that contain 4 field of different type of employee id, and 1 employee master.

And what i want to do is to create a relationship between these two tables like picture below,

Untitled 1.png

How to do this in QlikView?

Thanks,

Best Regards

1 Reply
Highlighted
MVP
MVP

Admin:

load distinct Admin_ID

From TransHeader;

Presales:

noconcatenate

load distinct Presales_ID

From TransHeader;


Sales:

noconcatenate

load distinct Sales_ID

From TransHeader;


QA:

noconcatenate

load distinct QA_ID

From TransHeader;

TransHeader:

load Trans_Id,

       Admin_ID as Employee_ID

       'Admin' as EmployeeType

From TransHeader

where exists(Admin_ID);

concatenate(TransHeader)

load Trans_Id,

       Presales_ID as Employee_ID

       'Presales' as EmployeeType

From TransHeader

where exists(Presales_ID);

concatenate(TransHeader)

load Trans_Id,

       Sales_ID as Employee_ID

       'Sales' as EmployeeType

From TransHeader

where exists(Sales_ID);

concatenate(TransHeader)

load Trans_Id,

       QA_ID as Employee_ID

       'QA' as EmployeeType

From TransHeader

where exists(QA_ID);


drop tables Admin,Presales,Sales,QA;


MS_Employee:

load *

From MS_Employee;