Forum Discussion
homboy27
5 months agoHelper III
Combine 2 rows into 1
Please see above. I have a data that has some information on row 1 and some on row 2. Is there a way to combine these 2 rows into 1 row and make it a header?
- 5 months ago
pls try
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WUtJBIMfc/NK8EiAjJLEitRhIO5cWFaXmJVeChPJLEnOA4gowtoJbKlBNrE60knNOZipYm3NmCUhpcEliSSqICzKtqBLZBhACaakAMvBjqqqKBQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Column3 = _t, Column4 = _t, Column5 = _t, Column6 = _t, Column7 = _t, Column8 = _t, Column9 = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}), from = Table.ColumnNames(#"Changed Type"), NM1 = List.RemoveMatchingItems(Table.ToRows(#"Changed Type"){0},{""}), NM2 = List.RemoveMatchingItems(Table.ToRows(#"Changed Type"){1},{""}), nam =NM2 & NM1, final =Table.RenameColumns(#"Changed Type" , List.Zip({from,nam})), #"Removed Top Rows" = Table.Skip(final,2) in #"Removed Top Rows"
homboy27
5 months agoHelper III
that doesnt work for some reason is it possible to do it in transform data?