Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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
swuehl
MVP
MVP

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;

View solution in original post

4 Replies
Not applicable
Author

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

swuehl
MVP
MVP

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
Author

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

swuehl
MVP
MVP

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.