How to remove a row in a data table based on the content of two columns

I populate a datatable from a scrape of a table on a web page. The data looks like the following:

I would like to remove the rows where both Score and Total are 0 and or NA. If either has a value in it greater than 0 or that is not NA, then I want to keep the row.

I tried using an IF statement in a For each row and deleting the row if the conditions of the IF were met, but the For each row does not like it when you delete a row in the For loop. This makes sense because the new total number of rows has changed and would impact the loop.

How might I achieve removing the row based on two conditions?
(Score=β€œ0” OR Score=β€œNA”) AND (Total=β€œ0” OR Total=β€œNA”)

1 Like

Hi @DaveF

Use Filter DataTable Activity.

Refer below documentation



Thanks. I don’t know how I missed that option but it is exactly what I needed.

For anyone reading trying to do the same thing I was able to set the filter rows to
or Score=β€œNA”
and Total=β€œ0”
or Total=β€œNA”

Worked perfectly.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.