Forum Discussion

guyatisk's avatar
guyatisk
Icon for Helper II rankHelper II
3 years ago
Solved

Delete rows based on content of field

In power query, is there a way to remove rows if a certain string is contained in a field?  So if "abc" or "xyz" exist in a field named "Charge", I do not want that ending up in the dataset.  Is there a way to filter/remove those rows?  Thanks for the information

  • Found it - 

    Table.SelectRows(#"Added custom 3", each not Text.Contains([Charge], "ABC") or [Charge] <> "XYZ"))
     
    I will keep this here for anyone who might need it

1 Reply

  • Found it - 

    Table.SelectRows(#"Added custom 3", each not Text.Contains([Charge], "ABC") or [Charge] <> "XYZ"))
     
    I will keep this here for anyone who might need it