amitchandak's avatar
amitchandak
Icon for Super User rankSuper User
4 years ago

Power BI Append Table Vertically(Row by Row), Combine Queries without key

Power BI Append Table Vertically, Combine Queries without key

 

 

Problem:

There are two tables D1 and D2. They do not have any common column. They need to be appended vertically. Columns side by side.

Solution:

List.Zip can help. It can append lists vertically. Columns can be used vertically

 

Power Query Code

 

 

 

let
    Source = List.Zip({D1[C1],D1[C3], D2[C2]}),
    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Extracted Values" = Table.TransformColumns(#"Converted to Table", {"Column1", each Text.Combine(List.Transform(_, Text.From), ","), type text}),
    #"Split Column by Delimiter" = Table.SplitColumn(#"Extracted Values", "Column1", Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv), {"Column1.1", "Column1.2", "Column1.3"}),
    #"Changed Type" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"Column1.1", type text}, {"Column1.2", type text}, {"Column1.3", Int64.Type}})
in
    #"Changed Type"

 

 

 

Click Here to access all my blogs and videos in a jiffy via an exclusive visual glossary using Power BI.
Please like, share, and comment on these. Your suggestions on improvement, challenges, and new topics will help me explore more.

You Can watch my Power BI Tutorial Series on My Channel, Subscribe, Like, and share

No RepliesBe the first to reply