Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Excluding connected values

Hi,

I'm trying to find a solution.

I have two fields:

Employee and Department.

Each employee has a linked department, even if he is a chief of this department. I also have a list of chiefs, stored into Excel file.

What I need is to load Employees, which are Chiefs without related field value in the field Department

Thanks for your help in advance!

Regards,

Kristina

1 Solution

Accepted Solutions
MVP
MVP

Re: Excluding connected values

I am unsure what you are trying to achieve, maybe seomthing like this:

LOAD

     Chief

FROM ExcelFile;

LOAD

     Employee,

     if(not exists(Chief, Employee), Department) as Department

FROM EmployeeTable;

4 Replies
Not applicable

Re: Excluding connected values

Hello Kristina,

i think about script functions like WHERE EXISTS or KEEP to reach your goal.

Are you able to upload some sample data?

Rainer

MVP
MVP

Re: Excluding connected values

I am unsure what you are trying to achieve, maybe seomthing like this:

LOAD

     Chief

FROM ExcelFile;

LOAD

     Employee,

     if(not exists(Chief, Employee), Department) as Department

FROM EmployeeTable;

Not applicable

Re: Excluding connected values

Hi swuehl!

Thanks for reply!

Exists is right what I need. But my QV Report is huge and I have to store information in different tables, using QUALIFY.  So do I need to use resident [Chiefs] and how can I combine loading from 2 different sources

(only information about chiefs is from EXCEL, other fields are from SQL Server)?

Regards,

Kristina

MVP
MVP

Re: Excluding connected values

Sorry Kristina,

I don't really get what your issue is here.

If you have already loaded the Chief field in another table, no need to reload it again. Exists wills check for value existence in fields, not in tables.

And combining multiple sources should be straight forward, just adapt your source in the LOAD statement.