This looks as a simple and a nice solution, the only thing I have null values and not '-'. I guess QlikView displays nulls as '-' in tables. So '-' character can not be used in the condition.
This looks great but the issue is the same as I mentioned to Thirumala below, I'm having nulls in my data and not '-' which is just displayed By QlikView when values are null.
Thanks all for your help. All the suggestions make sense but still didn't get my problem solved 100%. After a few researches, it turned out that it's tricky how QlikView handles the null values. I read a great document from this thread and concluded that converting null values to a string, e.g. <NULL>, in the load script and then applying your suggested script did the trick.
PS: data source from SQL Server