Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
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
Partner Ambassador/MVP
Partner Ambassador/MVP

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
Partner Ambassador/MVP
Partner Ambassador/MVP

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