Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Welcome to our newly redesigned Qlik Community! Read our blog to learn about all the new updates: READ BLOG and REPORTED ISSUES
cancel
Showing results for 
Search instead for 
Did you mean: 
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

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

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

Contributor II
Contributor II

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.

Partner
Partner

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.

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.

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