Forum Discussion

massotebernoull's avatar
4 years ago
Solved

Replace multiple words in a row

Hello, I'm struggled with this replacement:   I have this table: Original TRY1 TRY2   Non-qualified Non-qualified   Non-qualified Non-qualified   Non-qualified Non-qualified ...
  • AlexisOlson's avatar
    AlexisOlson
    4 years ago

    Ah, I think the issue must be earlier then.

     

    Try putting the null check in earlier:

    Text.Combine(
        List.Transform(
            Text.Split(if [Original] = null then "" else [Original], ","),
                each
                    if      _ = "100000011" then "Declared bankruptcy"
                    else if _ = "100000014" then "Filantropic school"
                    else if _ = ""          then "non-qualified"
                     else "Verify"
            ),
            ","
        )
    )