match

Indeed, match function is a magical function when it comes to string comparison in Qlikview.

For those of you who know SQL, you can use “in” operator in SQL statement to limit data set for certain matching values in a given column.

For example, if I want to retrieve data set for those employees with title of either President or Vice President, a SQL enthusiast would write,

SELECT * FROM EMPLOYEES WHERE TITLE IN (‘PRESIDENT’, ‘VP’)

If you are wondering how Qlikview can do something similar, you need to explore Match function in Qlikview.

 Load *  From …..   WHERE Match(Title, ‘President’, ‘VP’)

The only caveat when it comes to Qlikview is its idiosyncratic case-sensitive behavior . In other words, Qlikview is ruthless if you don’t pay attention to case when you supply values to match using match function.  ‘President’ and ‘PRESIDENT’ are two different values in Qlikview’s world.

Let’s revise dual function example to simplify IF statement using the match function.

Step 1:  Rewrite IF statement to find matching Category values.

Match Function1

 

Step2:  Add a variable  to exclude values from data set using match function in the WHERE clause.

match function3

Step 3:  Use match function in the WHERE clause including variable.

Match function2

That’s it.  Now explore your own ways to add power of magical match function in your Qlikview app.

Elsewhere:

Match function in Qlikview via Qlikshare.com

The Match() Function via Qlikview Notes

In Statement in Qlikview — Match()  via One Qlik at a time

photo by: DeeGillette