Forum Discussion

Saray_kh's avatar
Saray_kh
Frequent Visitor
3 years ago

How to match exact string with masked string

Hi Colleagues!

I need your help to match to columns to being able to compare the price.

I have two tables with model and price information, and I need to compare the prices of the models by exact match or similar since I have many masked models.
I have already tried fuzzy matching and it does not do it correctly.

 

Here is an example of the data I have.
Table 1 (with exact models)
MODEL         PRICE
P3JK4M        50000€
P3TO4L        47500€
R4TI9P         35600€

 

Table 2 (with exact models and masked models)
MODEL         PRICE
P3J*4*          45000€
P3T***          45670€
R4TI9P         32450€

 

The desired result would be to match model P3JK4M with model P3J*4*, P3T*** with P3TO4L and R4TI9P with R4TI9P in order to make a price comparison.

 

Do you think it is possible with Power Query or DAX?

Thank you very much in advance!

2 Replies

  • Saray_kh Try to play around with Similarity Threshold value. Range is between 0 to 0.1, it means how strict is your model.

     

     

    • Saray_kh's avatar
      Saray_kh
      Frequent Visitor

      Hi Tahreem24 ! It doesn't work, the models with * appear as null. I tried to normalize the string replacing the * for a space but it didn't work neither.