Knime Ranking First Occuring Date

image

How to rank the data based on a specific identifier. In our case 1000005 has a collection of dates and I want them to be ranked on which comes first and which comes last.

So have 1 -> 2 -> 3, assigned. So I can create a lifecycle.

Hi @shubhamss -

Off the top of my head, you might try the GroupBy node with First and Last aggregation to identify the relevant dates. Then maybe a Rank node (or perhaps just a Sorter node would work) to order everything?

I’ll throw my 2 cents in here as well.

If you make sure your data is sorted first by the ID code and then by the date field, which you can do with the Sorter node if needed, you can use the Moving Aggregation node with the cumulative setting checked and the ID set to a count aggregation.

image

1 Like

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