Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

ravishinge
Contributor

How to Select data by applying conditions

hello guys,

Could you please help me with the following :-

[MasterProject]:

LOAD Distinct

"Id Project",

Status,

If (Wildmatch(Status,'Anticipated', 'Quote Submitted' , 'No Quote') , 'Progress',

If (Wildmatch(Status,'Lost', 'WIN in Flow 3','Successfully finalized and closed',

'WIN Successfully transferred to DPLM', 'Canceled') ,'Winstatus')) as [Status Type]

FROM [Project.qvd]

(qvd);

I am loading all Status in Master Project and hence all ID projects will be displayed .

But Now I need "Id Project" based on only below mentioned

Status,'Lost', 'WIN in Flow 3','Successfully finalized and closed',

'WIN Successfully transferred to DPLM', 'Canceled' 

How should i do this ? Left join or Another project ? Concatenate or Noconcatenate?

Please help

Thanks,

ravi

4 Replies
YoussefBelloum
Esteemed Contributor

Re: How to Select data by applying conditions

Hi,

[MasterProject]:

LOAD Distinct

"Id Project",

Status,

If (Wildmatch(Status,'Anticipated', 'Quote Submitted' , 'No Quote') , 'Progress',

If (Wildmatch(Status,'Lost', 'WIN in Flow 3','Successfully finalized and closed',

'WIN Successfully transferred to DPLM', 'Canceled') ,'Winstatus')) as [Status Type]

FROM [Project.qvd]

(qvd)

where match([Id Project], 'Lost', 'WIN in Flow 3','Successfully finalized and closed','WIN Successfully transferred to DPLM', 'Canceled');

ravishinge
Contributor

Re: How to Select data by applying conditions

Thanks for your reply ! But I need t maintain two separate project

1. In One case I need all status from Master project

2. I need only

Status,'Lost', 'WIN in Flow 3','Successfully finalized and closed',

'WIN Successfully transferred to DPLM', 'Canceled' 

to carry out another sort of calculation

so my question is how do i do second part buy not altering 1st part with all status

thanks

YoussefBelloum
Esteemed Contributor

Re: How to Select data by applying conditions

here is one method to do it:

[MasterProject]:

LOAD Distinct

'reduced' as Flag,

"Id Project",

Status,

If (Wildmatch(Status,'Anticipated', 'Quote Submitted' , 'No Quote') , 'Progress',

If (Wildmatch(Status,'Lost', 'WIN in Flow 3','Successfully finalized and closed',

'WIN Successfully transferred to DPLM', 'Canceled') ,'Winstatus')) as [Status Type]

FROM [Project.qvd]

(qvd)

where match([Id Project], 'Lost', 'WIN in Flow 3','Successfully finalized and closed','WIN Successfully transferred to DPLM', 'Canceled');

concatenate

LOAD Distinct

'complete' as Flag,

"Id Project",

Status,

If (Wildmatch(Status,'Anticipated', 'Quote Submitted' , 'No Quote') , 'Progress',

If (Wildmatch(Status,'Lost', 'WIN in Flow 3','Successfully finalized and closed',

'WIN Successfully transferred to DPLM', 'Canceled') ,'Winstatus')) as [Status Type]

FROM [Project.qvd]

(qvd);

ravishinge
Contributor

Re: How to Select data by applying conditions

Thank you for your reply !

Yes it works ! But my concern is Do we need to load qvd file twice as It has already loaded in Master Project?

Also I didn't understand Flag concept ?

'reduced' as Flag,

'complete' as Flag, 

Even I wanna use flags but dont know how to create them as I need to calculate percentages of ID projects based on status conditions .

Thanks,

ravi