Forum Discussion

wiczit's avatar
wiczit
New Member
5 years ago
Solved

Transform.Columns with TextCombine

Hi everybody, hope you're doing great.   In advance, I am quite a neewbie in the advanced use of M language, apologies.   Summary I need your help to concatenate a value within the same column (...
  • CNENFRNL's avatar
    CNENFRNL
    5 years ago
    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WUtJRcgRiU6VYnWilJCALiEqKSlPBfGcgJwWIXdPSlWJjAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [stringField1 = _t, stringField2 = _t, other = _t]),
        Transformed = List.Accumulate({"stringField1","stringField2"}, Source, (s,c) => Table.TransformColumns(s, {c, each if Text.Length(_)=0 then null else """"&_&""""}))
    in
        Transformed