Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Create 3 subsets (table from Original Table)

Hi Team,

Can you please guide me How can I create 3 subsets (tables using Where Clause) from parent table...

I am finding difficulty in using Where clause

Say I have a table named Original

Say it has a field named Status and Say Status has Value like Unresolved, Resolved and Delete

How I can create 3 subsets of tables , Table 1 where Status ='Resolved'

Table 2 where Status ='Unresolved'

Table 3 where Status ='Deleted


I have my Script for Original table as

Original:

LOAD Id, FileDate,

                Status, 

FROM

(ooxml, embedded labels);

Regards

Siddharth

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Original:

LOAD Id, FileDate,

                Status,

FROM

(ooxml, embedded labels);

NoConcatenate

T1:
Load * Resident Original Where Status = 'Resolved';

Store T1 into T1.qvd(QVD);

NoConcatenate

T2:
Load * Resident Original Where Status = 'Unresolved';

Store T2 into T2.qvd(QVD);

NoConcatenate

T2:
Load * Resident Original Where Status = 'Deleted';

Store T3 into T3.qvd(QVD);

Drop Table Original;

===============================

I am assuming that you want to create 3 different QVDs.

If you don't want to do this... what is the reason you want to have three different tables with different status?

View solution in original post

3 Replies
MK_QSL
MVP
MVP

Original:

LOAD Id, FileDate,

                Status,

FROM

(ooxml, embedded labels);

NoConcatenate

T1:
Load * Resident Original Where Status = 'Resolved';

Store T1 into T1.qvd(QVD);

NoConcatenate

T2:
Load * Resident Original Where Status = 'Unresolved';

Store T2 into T2.qvd(QVD);

NoConcatenate

T2:
Load * Resident Original Where Status = 'Deleted';

Store T3 into T3.qvd(QVD);

Drop Table Original;

===============================

I am assuming that you want to create 3 different QVDs.

If you don't want to do this... what is the reason you want to have three different tables with different status?

Not applicable
Author

Thanks Manish,

Yes you are right, I was thinking of joining them so that I can have Date open(from Table 2) and Date Close(Table) in One New Table, and then May be it is easier for me to calculate Cycle Time

Can you guide me with better alternate, as there are Ids can be in Unresolved status for may dates..eg

Id Error Date             Status

A   1     12/1/2016      Unreolved

A   1      12/2/2016     Unresolved

A    1      12/3/2016     Unresolved

A   1      12/5/2016       Resolved

and I need to find average Cycle time, Best part is I also need to create aging(if Status remain Open )

Regards

Siddharth

Not applicable
Author

Hi Manish,

When I am trying to draw table from T1, Due to synthetic Keys, I am getting all the entries apart from Resolved status.

I was thinking of using a complete join between Table T 1 and T2

Regards

Siddharth