Forum Discussion
Shan_Drex12
5 years agoHelper I
2 column merge dynamic
Hi All, Quick question: I have a data sheet that only has this column Code alongwith some other data (Sheet 1. Full Data) Code AR BA BG BH BO BT CP CR...
- 5 years ago
can you please try this as a custom column. I have removed the last column from the lookuptable to test out the code.
//table t2 let Source = Web.BrowserContents("https://community.powerbi.com/t5/Power-Query/2-column-merge-dynamic/m-p/1645518#M50293"), #"Extracted Table From Html" = Html.Table(Source, {{"Column1", "TABLE:nth-child(8) > * > TR > :nth-child(1)"}, {"Column2", "TABLE:nth-child(8) > * > TR > :nth-child(2)"}}, [RowSelector="TABLE:nth-child(8) > * > TR"]), #"Changed Type" = Table.TransformColumnTypes(#"Extracted Table From Html",{{"Column1", type text}, {"Column2", type text}}), #"Promoted Headers" = Table.PromoteHeaders(#"Changed Type", [PromoteAllScalars=true]), #"Changed Type1" = Table.TransformColumnTypes(#"Promoted Headers",{{"Code", type text}, {"Names", type text}}), #"Removed Bottom Rows" = Table.RemoveLastN(#"Changed Type1",1) in #"Removed Bottom Rows"//table t1 let Source = Web.BrowserContents("https://community.powerbi.com/t5/Power-Query/2-column-merge-dynamic/m-p/1645518#M50293"), #"Extracted Table From Html" = Html.Table(Source, {{"Column1", "TABLE:nth-child(4) > * > TR > :nth-child(1)"}}, [RowSelector="TABLE:nth-child(4) > * > TR"]), #"Changed Type" = Table.TransformColumnTypes(#"Extracted Table From Html",{{"Column1", type text}}), #"Promoted Headers" = Table.PromoteHeaders(#"Changed Type", [PromoteAllScalars=true]), #"Changed Type1" = Table.TransformColumnTypes(#"Promoted Headers",{{"Code", type text}}), #"Added Custom1" = Table.AddColumn(#"Changed Type1", "Custom.1", each let x = Text.From([Code]), y = List.PositionOf(t2[Code],x), z = try t2[Names]{y} otherwise null in z) in #"Added Custom1"
Shan_Drex12
5 years agoHelper I
Hi smpa01
I have another sheet that I want to match but this time, the list is longer. I tried using your formula above, but when I hit close and apply it takes a very long time load... over 30 mins. Is there a faster way to run the data by using a different formula to custom merge two data sets?