Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Merge all available Columns Power Query

Hi All   This is Probably a simple one for anyone who understand M Language..   I'm pulling text from a PDF and need to know how i Merge all columns into 1 in Power Query when the number of colum...
  • Jimmy801's avatar
    Jimmy801
    5 years ago

    Hello Anonymous 

     

    use Text.Combine and refer to your report-column. Heren an example

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUXJ0UorViVYyAjKdXcBMYyDT1Q3MNAEy3T30wGxTINtTKTYWAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Index = _t, Report = _t]),
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"Index", Int64.Type}, {"Report", type text}}),
        CombineText = Text.Combine(#"Changed Type"[Report], " ")
    in
        CombineText

     

    Copy paste this code to the advanced editor in a new blank query to see how the solution works.

    If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
    Kudoes are nice too

    Have fun

    Jimmy