Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am new in QS, so I need your help.
I want to load data but only selected data.
For Example :
Date | Category | Sales |
01-Nov | Ladies | 100 |
02-Nov | Mens | 200 |
03-Nov | Ladies | 124 |
04-Nov | Ladies | 220 |
05-Nov | Mens | 90 |
06-Nov | Children | 150 |
07-Nov | Mens | 170 |
08-Nov | Children | 188 |
09-Nov | Ladies | 200 |
10-Nov | Teen | 360 |
11-Nov | Teen | 180 |
12-Nov | Ladies | 100 |
13-Nov | Mens | 80 |
I want to load only Category Ladies and Chidren.
Can you guys help me on this ?
Thanks a lot
Henry
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
Hi,
Use like
Load * from resident where Category = 'Ladies' and Category 'Children';
Hi Henry,
Try this:
Load * FROM <YourTableName>
Where Match(Category,'Ladies','Children')
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
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
Thanks guys, I get the correct statement now.