Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
smusayev
Contributor II
Contributor II

Selecting/Load specific Data from a Column

Hi

I have a table with several columns.

A specific column has 10 fields of which I need only 3.

Column A

'a'

'b'

'c'

-

-

'k'

I am trying to load specific fields from a column instead of loading all of them.

For example in SQL, I would use,

Select *

From xxxxxxx

Where Column A IN ( 'a' or 'b' or 'c')

How can I do the same in QLik sense load editor.  Either filter out the column or a create a new column with only those fields.

(The actual number of columns and field is much larger than provided in the example.)

Please help.

1 Solution

Accepted Solutions
sunny_talwar

You can filter them out in your SQL like this:

Select *

From xxxxxxx

Where Column A IN ( 'a', 'b', 'c');

or you can do it in the preceding load

LOAD *

Where Match([Column A], 'a', 'b', 'c');

Select *

FROM xxxxxxx;

View solution in original post

5 Replies
sunny_talwar

You can filter them out in your SQL like this:

Select *

From xxxxxxx

Where Column A IN ( 'a', 'b', 'c');

or you can do it in the preceding load

LOAD *

Where Match([Column A], 'a', 'b', 'c');

Select *

FROM xxxxxxx;

smusayev
Contributor II
Contributor II
Author

Hi Sunny,

I keep on getting the following error below.  I am using Qlik Sense Server version and I am trying to load an excell spreadsheet.  I can load as is without any issues, but when I use a where statement I get the message below.

Any Ideas?

There is no open data connection. Missing or failed "CONNECT" statement.

TKendrick20
Partner - Specialist
Partner - Specialist

What is the source of your data? That might help us come up with some solutions.

You could do something like:

[TableName]:

Load * Inline [

Column A

a

b

c

];

Then JOIN the other columns onto this table such that records with ColumnA values not already in TableName are not added.

ToniKautto
Employee
Employee

You should consider if it is better to filter in your SQL query when loading or in the LOAD statement. Filter in SQL means that the data does not have to be transferred to Qlik Sense, and does not have to allocate memory, which can improve performance if you SQL server makes the filtering quicker than Qlik server.

There are several option to filter your data in Qlik Sense. The choice depends on your scenario, and on what is most efficient depending on your data. In attached sample you can see very basic examples of how to filter using JOIN, Mapping Table and Exists(). These are very common techniques, that you can find more details on in Qlik | Help or here in Community.

sunny_talwar

Did you not add the SQL Connect statement? I mean how does your complete script look like?