Forum Discussion
n007jl
3 years agoFrequent Visitor
Eliminating combination pairs from two columns
Hi Everyone, Running in to a bit of an issue with removing duplicating combinations between two columns. How do I go about picking one report_id in this case and find all the linked_to_report_id ...
- 3 years ago
Hi n007jl ,
You can do something like this:
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSlTSUUpWitWJVkoCshLBrGQ4CySbpBQbCwA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [id = _t, link = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"id", type text}, {"link", type text}}), #"Added Custom" = Table.AddColumn(#"Changed Type", "Filter", each List.Sort({[id], [link]})), #"Removed Duplicates" = Table.Distinct(#"Added Custom", {"Filter"}) in #"Removed Duplicates"Kind regards,
John
jbwtp
3 years agoMemorable Member
Hi n007jl ,
You can do something like this:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSlTSUUpWitWJVkoCshLBrGQ4CySbpBQbCwA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [id = _t, link = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"id", type text}, {"link", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Filter", each List.Sort({[id], [link]})),
#"Removed Duplicates" = Table.Distinct(#"Added Custom", {"Filter"})
in
#"Removed Duplicates"Kind regards,
John
n007jl
3 years agoFrequent Visitor
Thanks! I think this would work nicely.