Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
mahishah
Contributor
Contributor

How to filter a new table with values from earlier resident table

I have an already resident table "abc" 

I want to make a new table from abc by using filtering the same table. I want to filter the table one one column, column Unique ID such that column Indicator is True. So basically something like the in clause in SQL 

In sql I would do select Unique ID, Indicator from abc where Unique ID in (select select Unique ID, Indicator from abc where Indicator = 'True'). Want to do same thing in Qlik 
Please help 

Labels (6)
2 Replies
BrunPierre
Partner - Master II
Partner - Master II


[New Table]:
LOAD Unique ID,
Indicator

Resident abc
Where Indicator = 'True';

DROP Table abc;

farah75
Contributor
Contributor

To achieve this, you can follow these steps:

  1. Load your existing table "abc" into Qlik.
  2. In the script editor, create a new table using the "Resident" keyword and name it something like "newTable". This will be the new table that you create based on the filtered results.
  3. In the "newTable" script, use the "Where" keyword to filter the rows from the "abc" table where the "Indicator" column is true. You can use the dollar sign expansion to reference the field in the existing table like this:

newTable: LOAD [Unique ID], [Indicator] Resident abc Where [Unique ID] = [Unique ID] and [Indicator] = 'True';

This will create a new table called "newTable" that only includes rows where the "Indicator" column is true. The dollar sign expansion in the "Where" clause ensures that you are referencing the correct column in the existing table.