Forum Discussion

PowerBITesting's avatar
6 years ago
Solved

Replacing comma separated values to texts with creating a New column

Trying to create a Column with below Logic  #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Text.Combine( List.ReplaceMatchingItems(Text.ToList ([CommaSeparatedNumbersColumnName]),...
  • Greg_Deckler's avatar
    6 years ago

    PowerBITesting - You can use SUBSTITUTE in DAX:

    New Column = 
      SUBSTITUTE(
        SUBSTITUTE(
          SUBSTITUTE([Column],"100","A"),
          "200","B"
        ),
        "300","C"
      )

    Should be able to do the same thing in Power Query essentially nesting your replacer functions. ImkeF edhans