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

How to Load data with selected data

Hi All,

I am new in QS, so I need your help.

I want to load data but only selected data.

For Example :

DateCategorySales
01-NovLadies100
02-NovMens200
03-NovLadies124
04-NovLadies220
05-NovMens90
06-NovChildren150
07-NovMens170
08-NovChildren188
09-NovLadies200
10-NovTeen360
11-NovTeen180
12-NovLadies100
13-NovMens80

I want to load only Category Ladies and Chidren.

Can you guys help me on this ?

Thanks a lot

Henry

1 Solution

Accepted Solutions
its_anandrjs

Hi,

If you want to filter those data in the load script then you can do this way

1.

Load * From SourceTable

Where Match(Category,'Ladies','Children');

2. In the Front end with If condition or calculated dimension

If( Match(Category,'Ladies','Children'),Category)

Note :- Use suppress when value is null option here in chart.

3. In Set expression

Sum({<Category = {'Ladies','Children'} >} Sales)

Hope this helps

Regards

Anand

View solution in original post

5 Replies
Not applicable
Author

Hi,

Use like

Load * from resident where Category = 'Ladies' and Category 'Children';

vishsaggi
Champion III
Champion III

Hi Henry,

Try this:

Load * FROM <YourTableName>

Where Match(Category,'Ladies','Children')

its_anandrjs

Hi,

If you want to filter those data in the load script then you can do this way

1.

Load * From SourceTable

Where Match(Category,'Ladies','Children');

2. In the Front end with If condition or calculated dimension

If( Match(Category,'Ladies','Children'),Category)

Note :- Use suppress when value is null option here in chart.

3. In Set expression

Sum({<Category = {'Ladies','Children'} >} Sales)

Hope this helps

Regards

Anand

Not applicable
Author

its failed. I am trying to get Home Gender only but the statement is wrong.

LIB CONNECT TO 'PALOMADB 5.3';

LOAD `id_gender`,

    `nama_gender`,

    `status_gender`;

SQL SELECT `id_gender`,

    `nama_gender`,

    `status_gender`

FROM `paloma_database`.gender;

Where Match(nama_gender,'Home');

here the message

Started loading data

Connecting to PALOMADB 5.3

Connected gender

Lines fetched: 16

Unknown statement Where Match(nama_gender,'Home')

Data load failed

Not applicable
Author

Thanks guys, I get the correct statement now.