Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Join “Do More With Qlik” with Mike Tarallo to get a first-hand look at the New Authoring Experience, June 29th: REGISTER HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
rajinikanth
Contributor III
Contributor III

Compare two fields using wild match in the script

Hi All 

I have data as below...

Table1:

Value

2018-03-12_MP_CHG*

2018-03-12_MP_CHGD*

 

Table2:

Value1

2018-03-12_MP_CHG_GUTD

2018-03-12_MP_CHGD_OPIUWR_TROE

 

i'm using a exists condition as below

new_table:

if(Exists(Value,Value1),'X','Y') as Sens_data_Value_COB_1;

resident Table2;

 

My requiremnt is to check, if the value1 in table2 matches with value in table1, consideirng the wild card entries as well then i need to mark them as 'X' else 'Y' the wilcard string.

 

Here all the values from table2 matches with all the values in table1

2018-03-12_MP_CHG* is equal to  2018-03-12_MP_CHG_GUTD   (as * after CHG can be anything)

2018-03-12_MP_CHGD* is equal to  2018-03-12_MP_CHGD_OPIUWR_TROE (as * after CHGD can be anything).

 

How can i do it.

Labels (3)
1 Solution

Accepted Solutions
rwunderlich

You can achieve this with "wildcard mapping" which uses a generated pick(match()) expression.  See this example for details:

Qlikview Cookbook: Mapping With Wildcards http://qlikviewcookbook.com/recipes/download-info/mapping-with-wildcards/

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

View solution in original post

1 Reply
rwunderlich

You can achieve this with "wildcard mapping" which uses a generated pick(match()) expression.  See this example for details:

Qlikview Cookbook: Mapping With Wildcards http://qlikviewcookbook.com/recipes/download-info/mapping-with-wildcards/

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com