Delete outstanding values

Hi :smiley: I want to keep pattern: A and b (b can be more than one) in my table. I try lag column but nothing comes to mind.
i have:
Zrzut ekranu (68)

I want:
Zrzut ekranu (67)

Hi pjacob,

sorry I do not understand what you want exactly…
You want to keep all rows where the following row contains a different value?

That you should be able to do with the lag node as well as a rule engine
Example:
KNIME_project3.knwf (6.0 KB)

Maybe this post will help you with the lag-column (if you want to do a negative lag):

2 Likes

Can you explain deletion rule.
Do you want clear consecutive A values?
Why did you delete the last A?

Hello @AnotherFraudUser :slight_smile: I also want to keep Row4, Row5, Row6 in your workflow.

1 Like

Hi @pjacob

With the Lag Column node you are almost there. See this workflow delete_outstanding_values.knwf (14.0 KB) .
gr. Hans

4 Likes

Hi pjacob,

so you only want to filter the equals if the value is “A”?
Then you can use the workflow from HansS :slight_smile:

Or change the rule in the rule engine from my workflow to:
NOT $column1$ = $Last(column1)$ OR NOT $column1$ = “A” => “keep”
1=1 => “filter”

*so basically if you want to look ahead you can use my workflow (with the slight change) or if you want to look-behind for your check then use HansS workflow :stuck_out_tongue:

4 Likes

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