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: 
rassanbekov
Partner - Contributor
Partner - Contributor

Employee lists

Hello!

I have faced the problem. There are two lists of employees.

First contains the employee names for all departments.

The second contains only one department employees.

The data should be filtered by the one department employee only.

When I use "as" in script, the employees are properly matched. But the data for other employees are also loaded. How can I stop loading the data for all employee in Qlikview?

22 Replies
rassanbekov
Partner - Contributor
Partner - Contributor
Author

Thanks for support. Please see input data

Assume Table 1 consists of detailed information on all employees in Company (as attached file).

The Table 2 consist of only employees related to Department 1.

The task goal is to load into Qlik only the details relevant to Department 1 including details from Table 1. But no details on other emloyees needed.

Please help

rassanbekov
Partner - Contributor
Partner - Contributor
Author

Your understanding is correct. But i did not get on inner join....

rassanbekov
Partner - Contributor
Partner - Contributor
Author

Please see below attached input data

jmvilaplanap
Specialist
Specialist

Hi

You can use a left join, for example:

LOAD

     *

From Table 2.xlsx

left join

LOAD

     [Department Name],

     [Employee name]          AS Employees,

     [Other Details],

     Salary

From Table 1.xlsx

Regards

d_prashanthredd
Creator III
Creator III

Its working fine for me.. only thing is you need to map the fields to join.

All_Departments:

load * Inline [

Department name, Employee name, Other details, Salary

Department 1, A, 123, 100

Department 2, B, 454, 500

Department 3, C, 123, 100

Department 1, D, 321, 547

Department 2, E, 21, 726

Department 3, F, 11, 27

Department 1, G, 33, 378

Department 2, H, 6, 435

Department 3, I, 55, 431

Department 1, J, 11, 742

Department 2, K, 3, 475

Department 3, L, 22, 726

Department 1, M, 1, 9

Department 2, N, 2, 478

Department 3, O, 3, 640

];

Modified:

load [Department name] as Department, [Employee name] as Employees, [Other details], Salary Resident All_Departments;

drop table All_Departments;

Inner join

load * Inline [

Department, Employees

Department 1, A

Department 1, D

Department 1, G

Department 1, J

Department 1, M

];

d_prashanthredd
Creator III
Creator III

Go through the sample app.

rassanbekov
Partner - Contributor
Partner - Contributor
Author

Thank you. But my Qlikview does not support you file extension.

Could you please rewite the script as it is make if simple loading data from excel is done. I can not understanding where in script I should write inner join my script looks like the following:

Directory;

LOAD

Department name as Department,

Employee name as Employees,

FROM [Data\Daily report.xlsx] (ooxml, embedded labels, table is Sheet1);

Directory;

LOAD

Department,

Employees

FROM [Data\june ch hours details_kz _emc.xls] (biff, embedded labels, table is Advisory$);

Left join or Inner join?

rassanbekov
Partner - Contributor
Partner - Contributor
Author

I cannot understand where in script to write left join?

I have the following script

Directory;

LOAD

Department name as Department,

Employee name as Employees,

FROM [Data\Daily report.xlsx] (ooxml, embedded labels, table is Sheet1);

Directory;

LOAD

Department,

Employees

FROM [Data\june ch hours details_kz _emc.xls] (biff, embedded labels, table is Advisory$)

rassanbekov
Partner - Contributor
Partner - Contributor
Author

Please see below

d_prashanthredd
Creator III
Creator III

Pls go through it..

Sorry, earlier I attached QlikSense app.

Thanks,