none
How to concatenate text into a text field RRS feed

  • Question

  • How do I concatenate text into a text field? For example, if I just want to add the text "abc" to the beginning of each item in that field.

    • Edited by GJL65 Tuesday, December 12, 2017 9:45 PM
    Tuesday, December 12, 2017 9:04 PM

Answers

  • Transform tab - Format - Add Prefix - abc gives:

    = Table.TransformColumns(Source, {{"MyTextField", each "abc" & _, type text}})

    • Marked as answer by GJL65 Wednesday, December 13, 2017 7:33 AM
    Wednesday, December 13, 2017 6:19 AM

All replies

  • "abc" & text
    Tuesday, December 12, 2017 9:39 PM
  • Thanks, but how does that look in the M code? This doesn't work:

    #"Concatenated" = Table.ReplaceValue(#"MySource",{"MyTextField"},"abc" & {"MyTextField"},Replacer.ReplaceText,{"MyTextField"})

    Tuesday, December 12, 2017 10:13 PM
  • Transform tab - Format - Add Prefix - abc gives:

    = Table.TransformColumns(Source, {{"MyTextField", each "abc" & _, type text}})

    • Marked as answer by GJL65 Wednesday, December 13, 2017 7:33 AM
    Wednesday, December 13, 2017 6:19 AM
  • Perfect, thanks! Silly me not to think of looking at *formatting* options..
    Wednesday, December 13, 2017 7:33 AM