0

Is there any function or node which will add the number of elements in a set chronologically?

I would like to create a simple line graph of "total number of users" over time, but what I have is "user_email" (unique) and "date_created" for the date the user joined.

What is the easiest way to sum the number of users at any given time from their creation date and plot it in a graph according to time?

I tried searching for this, but didn't find anything related. New to KNIME. Thanks.

dsaves
  • 181
  • 8

1 Answers1

1

If you are sure that user_email only contains unique values, you can sort the table by date_created (if it isn't already sorted) then use a Counter Generation node to add a column containing a counter value.

For a more general solution, if you want to count the cumulative total of unique values in a table column, you can use this sequence:

  • GroupBy configured to group by the column whose unique values you want to count and to aggregate on the column you want to plot this against - for example, your timestamp column, probably with either the First or Last aggregation method
  • Sorter to sort on the aggregation column from GroupBy
  • then Moving Aggregation with the Cumulative computation box checked, and configured to aggregate on Count of the grouped column from GroupBy.
nekomatic
  • 5,988
  • 1
  • 20
  • 27