Skip to main content

If the field called Investor contains CHFA anywhere in the string then return 'CHFA' and so on,...

 

CASE [Investor]

  WHEN  '%CHFA%' THEN 'CHFA'    

  WHEN '%FNMA-%' THEN 'BNYMellon'

  WHEN '%FHLMC-%' THEN 'BNYMellon'

  WHEN  '%GNMA-%' THEN 'USBank'

  WHEN '%MonitorOnly-%' THEN  'CHFA'

   WHEN  '%DMI-%' THEN  'DMI'

  END

4 个回答
  1. 2022年1月5日 19:31

    Hi, in this case you can use contains:

    IF CONTAINS([Investor],'CHFA') THEN 'CHFA'

    ELSEIF CONTAINS([Investor],'FNMA-') THEN 'BNYMellon'

    ELSEIF CONTAINS([Investor],'FHLMC-') THEN 'BNYMellon'

    ELSEIF CONTAINS([Investor], 'GNMA-') THEN 'USBank'

    ELSEIF CONTAINS([Investor],'MonitorOnly-') THEN 'CHFA'

    ELSEIF CONTAINS([Investor],'DMI-') THEN 'DMI'

    END

    If this post resolves the question, would you be so kind to "Select as Best"?. This will help other users find the same answer/resolution and help community keep track of answered questions. Thank you.

     

    Regards,

     

    Diego

    Tableau Ambassador

0/9000