Reduce duplicates rows

I have below table where some rows have duplicates. I need to get this reduced up to 3 rows as the transaction date has three different values. Also, I need other date from the other two columns as well.

Please note that I used duplicate rows filter for all columns but it did not give me what I was expecting as every contains something unique compares to the other rows.

Could somebody help me to get this reduced up to 3 rows with other column data?

KNIME HELP.xlsx (9.7 KB)

Hi @psycho

Your expected output is not very clear, do you want to keep the black or red rows?

That is exactly what the node should be doing. If they are unique, they are not duplicate and the duplicate row node has nothing to filter.

Anyway, use a Duplicate Row Filter that checks Transaction Date, Header Interface Number and Quantity.

Navigate to the Advanced tab

If you want to keep black, set it to Minimum of Document Line Number

If you want to keep red, set it to Maximum of Document Line Number.

Output:
image

2 Likes

If i do this ArjenEX I am loosing Document Line number data β€œ1” value, . See your out put has only β€œ2” in the output and β€œ1” is missing.

this below shows the output I need,

What makes that for some you need 1 and for others 2?

Its either 1,2,1 or 2,1,2 is fine as every couple of date lines we have 1 and 2 under document line number colun.

Output expected -

In that case use groupBy

1 Like

Apologies for my poor explanations AjenEX, its not 1 or 2 in one row. It should be
1
2
1
or the other match should be,
2
1
2

Hello @psycho,

you can try group loop and then inside build logic which in one iteration takes row where it’s 1 under document line column and in next it takes row where it’s 2 under it.

Br,
Ivan

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