Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
amiroh81
Creator
Creator

Best match connection

I have a 10-digit field and another field that contains a different number of digits between 1-10.

I would like to connect the fields when the connection will be based on the most accurate.

I thought about something like this:

=if(BO=vNum,BO,

       if(BO=mid(vNum,1,10),BO,

            if(BO=mid(vNum,1,9),BO,

                 if(BO=mid(vNum,1,8),BO,

                      if(BO=mid(vNum,1,7),BO,

                         if(BO=mid(vNum,1,6),BO,

                           if(BO=mid(vNum,1,5),BO,

                                if(BO=mid(vNum,1,4),BO,

                                     if(BO=mid(vNum,1,3),BO,

                                          if(BO=mid(vNum,1,2),BO,

                                               if(BO=mid(vNum,1,1),BO,)))))))))))

vNum=086123456

BO=086

BO=08

BO=0

What happens I get the exact result (For example 4 digits but I get even less fit)

How to find the best match only?

Thanks in advance

Labels (1)
11 Replies
vinieme12
Champion III
Champion III

Just use this much for Select in Field

=Maxstring(TOTAL if(Wildmatch(086123456,BO&'*'),BO))



Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
amiroh81
Creator
Creator
Author

right its work.

thanks