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: 
Anonymous
Not applicable

Create new table from two filter-tables

Hello,

data are loaded with a normal Load script. Now I would like to set two filters on the loaded data and write “class” in a new field. Two filter tables should be composed to a new table. Unfortunately, do I receive double records in new table?

Thanks for your help

 

DB:
Load * Inline [
name, baseSite, class, l1,  cost,
car,  SUP,      BS,     2,   78.482,
car,  SUP,      BU,     1,   84.082,
car,  SUP,      BU,    '-',  84.082,
car,  SUP,      Site,   0,   78.482,
car,  HQ,       BS,     2,   1.782.336,
]
;


Filter1:
 
Load class as new_class
 
Resident DB
 
Where class = 'BU';

Filter1:
 
Load class as new_class
 
Resident DB
 
Where class = 'BS

 

1 Solution

Accepted Solutions
hemanthaanichet
Creator III
Creator III

Hi Stefan,

I think there is some issue in your script

i tired in three different ways.

May this may help u i think

have a look at my attachment

Regards

Hemanth

View solution in original post

9 Replies
lironbaram
Partner - Master III
Partner - Master III

hi

have a look at the attach example

the problem with your script was that there wasn't any connection between the new field and the records.

this cause the rows to be multiply.

giakoum
Partner - Master II
Partner - Master II

use load distinct

Anonymous
Not applicable
Author

By filter do you mean a flag? that will allow you to select all class = BU values or class = BS? Or do you want them to be a separate table that allows you to filter for those two values only?

Anonymous
Not applicable
Author

Many thanks. Only BS and BU should be show in table.

Anonymous
Not applicable
Author

Filter1:
 
Load class
 
Resident DB
 
Where Match(class,'BU','BS');

Do not rename class as new class as it will not be able to filter your main table.

Anonymous
Not applicable
Author

Can you show me both solutions, pls.

hemanthaanichet
Creator III
Creator III

Hi Stefan,

I think there is some issue in your script

i tired in three different ways.

May this may help u i think

have a look at my attachment

Regards

Hemanth

Anonymous
Not applicable
Author

Many thanks, Stefan

hemanthaanichet
Creator III
Creator III

always Welcome Stefan Cheers...:)