Forum Discussion

Gusd8's avatar
Gusd8
Helper I
1 year ago
Solved

Power Query - Filter specific record that meats 2 criteria

Thank You for looking. I am not sure why this isn't working...

 

In the data we were fed a bad record. Each Transaction ID is expected to have a single Status. Unfortunately we were fed a single ID that has 2 statuses.

I am trying to filter out the offending record...but for some reason I am not writing it correctly...brain cramp Monday.

 

Filters to the exact record I want to remove...= Table.SelectRows(#"Changed Type", each (([Transaction ID] = "192" and [Status] = "COMPLETED")))

 

Filters out the whole transaction...= Table.SelectRows(#"Changed Type", each ([Transaction ID] <> "192"))

Filters out whole transaction and all "Complete" Status...= Table.SelectRows(#"Changed Type", each ([Transaction ID] <> "192" and [Status] <> "COMPLETED"))

Filters out whole transaction and all "Complete" Status...= Table.SelectRows(#"Changed Type", each (([Transaction ID] <> "192" and [Status] <> "COMPLETED")))

 

I am not sure why I am having problems applying this filter...but anyone who can tell me what I am doing wrong would be my hero today.

Thank you again for looking

 

 

 

  • You can try 

    Table.SelectRows(#"Changed Type", each not(([Transaction ID] = "192" and [Status] = "COMPLETED")))

2 Replies

  • You can try 

    Table.SelectRows(#"Changed Type", each not(([Transaction ID] = "192" and [Status] = "COMPLETED")))
    • Gusd8's avatar
      Gusd8
      Helper I

      YUP...That was it. today is going to be one of those days. Thank you very much for your guidance.