Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
We are aware of an issue with the Product Downloads page and looking into it.
cancel
Showing results for 
Search instead for 
Did you mean: 
MattMika
Contributor II
Contributor II

Using MATCH function with two parameters

Dear Community, 

Im new using Qlikview, I have a table which contains 3 columns : the items , the departments and the cities.
at the display level, I want to eliminate departments 2 which belong to cities 900 and 950 and eliminate departments 15 which belong to cities 850 and 860  in the WHERE condition 

Thanks in advance for your help

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

One easy way is to prepare a flag already in the script:

Load Item, Department, City,
If((Match(Department,2) and Match(City,900,950)) or (Match(Department,15) and Match(City,850,860)),0,1) as IncludeFlag
From <Source> ... ;

Then you can use the following Set expression in any aggregation:
{<IncludeFlag={1}>}

View solution in original post

2 Replies
hic
Former Employee
Former Employee

One easy way is to prepare a flag already in the script:

Load Item, Department, City,
If((Match(Department,2) and Match(City,900,950)) or (Match(Department,15) and Match(City,850,860)),0,1) as IncludeFlag
From <Source> ... ;

Then you can use the following Set expression in any aggregation:
{<IncludeFlag={1}>}

MattMika
Contributor II
Contributor II
Author

Thank you! It worked 👌