Forum Discussion
Anonymous
4 years agoNot applicable
Duplicate Rows
Hello All, I have the dataset as the following: Part Number Item description 026 48202 000 Catridge 026 35601 000 Oil I need duplicate both the columns by fo...
- 4 years ago
try this query
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjAyUzCxMDIwUjAwMFDSUXJOLCnKTElPVYrVgUgam5oZGEIl/TNzlGJjAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Part Number" = _t, #" Item description" = _t]), GroupRows = Table.Group(Source, {"Part Number"}, {{"All", each _, type table}}), CustomRepeat = Table.AddColumn(GroupRows, "Repeat", each Table.Repeat([All],4)), RemoveOtherColumns = Table.SelectColumns(CustomRepeat,{"Repeat"}), Expand = Table.ExpandTableColumn(RemoveOtherColumns, "Repeat", {"Part Number", " Item description"}, {"Part Number", " Item description"}) in Expand/Melanie
AlexisOlson
4 years agoSuper User
I don't see any screenshots.
- Anonymous4 years agoNot applicable
- MBreden4 years agoHelper I
try this query
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjAyUzCxMDIwUjAwMFDSUXJOLCnKTElPVYrVgUgam5oZGEIl/TNzlGJjAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Part Number" = _t, #" Item description" = _t]), GroupRows = Table.Group(Source, {"Part Number"}, {{"All", each _, type table}}), CustomRepeat = Table.AddColumn(GroupRows, "Repeat", each Table.Repeat([All],4)), RemoveOtherColumns = Table.SelectColumns(CustomRepeat,{"Repeat"}), Expand = Table.ExpandTableColumn(RemoveOtherColumns, "Repeat", {"Part Number", " Item description"}, {"Part Number", " Item description"}) in Expand/Melanie