4 Replies Latest reply: Jan 31, 2018 11:38 AM by surendra j RSS

    Compare string of two columns

    Victor GREFFET

      Hi community,

       

      I'd like to flag if the string of one column appear in an other column and count them in KPI, something like that (in the visual mode)

       

      IDDepartmentADepartmentBflag

      1

      AinxxxxAinxxxok
      2

      Cantal

      xxxxxxxxxxxnok
      3Garonnexxxxxxxxxxnok
      4AveyronxxxxAveyronok
      5
      ...

       

      I tried :

       

      -->   If(WildMatch(DepartmentA,'*'&DepartmentB&'*'),'Ok','nOK') as Flag

      -->  If(Substringcount(DepartmentA,'*'&DepartmentB&'*')<>1,'Ok','nOK') as Flag

       

      -->   If(WildMatch('*'&DepartmentA&'*',DepartmentB),'Ok','nOK') as Flag

      -->  If(Substringcount('*'&DepartmentA&'*',DepartmentB)<>1,'Ok','nOK') as Flag

       

      -->   If(WildMatch('*'&DepartmentA&'*','*'&DepartmentB&'*'),'Ok','nOK') as Flag

      -->  If(Substringcount('*'&DepartmentA&'*','*'&DepartmentB&'*')<>1,'Ok','nOK') as Flag

       

      Without success...

       

      Do you have an idea ?

      Thanks !