Create a new column with days elapsed from earliest date in an existing column.

I have a table that contains data collected on different samples (can be up to 24 samples - identified by vessel ID) over a period of up to 16 days. I want to populate a new column (Titer_Day) where the earliest date for each vessel ID is assigned a zero and then calculate the elapsed days for subsequent rows (per vessel ID) from the earliest date.

Start with this:

End with this:

Any thoughts on the best way to approach this task?

Thanks in advance,


@rhepler Can you attach a snippet of your data as an Excel or CSV file?

looks like you first sort your data and then do a ordinal ranking (Rank node) grouped by vessel

1 Like

Book1.xlsx (15.9 KB)


I have attached a workflow that shows how I would handle this. This method should be especially ideal if you have more than one vessel in a day.

Days Elapsed.knwf (32.7 KB)

1 Like

Thanks - worked as expected! This is a great help.

1 Like

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