Forum Discussion
Mikee5
3 years agoRegular Visitor
Delete Rows based on conditions
I am trying to clean rows containing Credit Notes as well as the rows with matching Invoices. For example I want to delete the row with CN-1234 as well as the row INV-1234. It is easy to delete all ...
- 3 years ago
Hi, Mikee5 one more
let Source = YourSource, cr_notes = List.Buffer(List.Select(Source[YourColumn], (x) => Text.Contains(x, "CN"))), lst = List.Buffer(List.Combine({List.Transform(CN, (x) => Text.Replace(x, "CN", "INV")), cr_notes})), select = Table.SelectRows(Source, (x) => not List.ContainsAny(x[YourColumn], lst)) in select
Mikee5
3 years agoRegular Visitor
Thanks all for the fantastic responses. I have ended up using the list.buffer solution which works well.