Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Exclude values based on IF condition

Hi All,

I have 2 QVDS files which I need to restrict the data at QVD level based on Region. I have a "CODE"column which has codes and other column which has "Region". Both are coming from different QVDs but mapped with common key.

I have 'US', 'UK', 'Asia', 'Other' in the region list.  I need to exclude some values in the "CODE" Column for some countries.

In other words, I need to Exclude A,B,C,D from the CODE column for US

AND E,F,G,H for Asia.

i.e IF Region = US THEN Exclude A,B,C,D from the CODE column

    AND

    IF Region = Asia THEN Exclude E,F,G,H from the CODE column

Is that be  possible to restrict the data based on the above condition?

Thanks

2 Replies

Re: Exclude values based on IF condition

Load * From QVDName

Where Not (

(Match(Code,'A','B','C','D') and Region = 'US') or

(Match(Code,'E','F','G','H') and Region = 'Asia')

)

Not applicable

Re: Exclude values based on IF condition

Thanks Manish!

Community Browser