Filter on one field based on the value of in another column for one of the rows

I have a set of data like this:

I want to remove all rows with the same “Ordrenr” if there is a value in PERCENT for any of the rows.

I bet there is a simple way of doing this, but please help me jumpstart my brain! :slight_smile:

Use Unique with Ordrenr=Keep Unique and PERCENT=count non-empty.

Filter this to keep only the rows with PERCENT > 0.

Subtract this dataset from the original using Ordrenr as the key.

1 Like

Brilliant! Thank you! :smiley:

1 Like

I had to try it to understand Admin’s suggestion, at top of the flow. I saw two further solutions:

The one with sort may result in a different order of the rows, the one with slide doesn’t change the order.
But the slide solution works only if the Ordrenr are on consequente blocks, so it is limited. My mathematical heart says Admin’s solution is the most elegant one :wink:

Filter Ordrenr.transform (5.9 KB)

1 Like

Unless @Anonymous can do it in 2 transforms? ;0)

you do not need “Unique” because “Subtract” works on the key-column even if there are multiple rows :wink:

Yes, but that doesn’t help with:

what’s wrong with this result ?

Can you post the .transform?

Filter Ordrenr.transform (2.4 KB)

1st solution from Olaf without the “Unique”

I worked out how did it just before you posted the .transform. That is indeed a more elegant solution. :grinning_face: :trophy:

1 Like