Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
learnerqlik53
New Contributor

linking two tables

Hi, 

I want two link two table.

Table1:
Month, Employee Id, Country, Age,  Region

Table2:

Submitted date, Recipient Id, Recipient Country, Recipient Age, Recipient Region, Submitter Id, Submitter Age, Submitter Country,Submitter Region

I have to calculate KPI on both Submitter and Recipient separately. Employee ID and Submitter Id and Recipient ID will have similar values.

Table1 is like total headcount data. And Table 2 is like part of people involve from that data.

i want to join both tables. But if i join with Employee ID from table 1 and Recipient ID then data will come wrong for Submitter KPI and if i join Employee ID and Submitter ID then Recipient data will come wrong.  As one submitter can give value to more than one Recipient.

Someone suggested me to use flags. But I am not sure how to use. Please suggest.

Labels (1)
1 Reply
Highlighted
learnerqlik53
New Contributor

Re: linking two tables

Adding Excel data and script for reference.

Script:(Not working)

Table1:
LOAD empid,
country,
division,
1 as FLAG
FROM
[Book2.xlsx]
(ooxml, embedded labels, table is Sheet1);


noconcatenate


LOAD [recipient id] as empid,
[recipient id],
[recipient country],
[recipient division],
[submitter id] ,  ,
[submitter country],
[submitter division]
FROM
[Book2.xlsx]
(ooxml, embedded labels, table is Sheet2);

noconcatenate

Table2:
LOAD empid as empid1,
country,
division,
2 as FLAG
FROM
[Book2.xlsx]
(ooxml, embedded labels, table is Sheet1);
noconcatenate


LOAD [recipient id] ,
[recipient country],
[recipient division],
[submitter id] as empid1,
[submitter id] ,
[submitter country],
[submitter division]
FROM
[Book2.xlsx]
(ooxml, embedded labels, table is Sheet2);