Forum Discussion

rickettdev's avatar
rickettdev
New Member
6 years ago
Solved

Issue when transposing excel sheet with powerbi

Hey PBiers! I've got a selection of 40 different excel workbooks (all have the same structure in regards to columns and sheets etc) and i'm trying to merge them. All Sheets are merging fine apart fr...
  • v-lid-msft's avatar
    v-lid-msft
    6 years ago

    Hi rickettdev ,

     

    We can try to use the pivot feature in power query editor to meet your requirement:

     

     

    All the queries are here:

     

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WckxKVtJRMlSK1YGxjZRiYwE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t]),
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", Int64.Type}}),
        #"Pivoted Column" = Table.Pivot(#"Changed Type", List.Distinct(#"Changed Type"[Column1]), "Column1", "Column2", List.Sum)
    in
        #"Pivoted Column"

     


    Best regards,