I am looking for a way to migrate COUNTIFS calculation to knime. I am aware that some part of it can be done by GroupBy, but I couldn't figure it out to my data. 

Here I provide a simplified version of data and formula I used to calculate required outcome (counting how many ID's I have before specific date, aggregated on class level).

Formula: =COUNTIFS($A$2:$A$12,A12,$B$2:$B$12,"<>"&B12,$C$2:$C$12,"<"&C12)

Class ID Date COUNTIFS_result
A 1234 1/1/2016 0
A 12345 3/1/2016 1
B 3254 5/1/2016 0
B 2568 7/1/2016 1
B 3658 9/1/2016 2
B 9874 11/1/2016 3
C 65889 1/1/2017 0
C 2563 3/1/2017 1
C 2365 5/1/2017 2
D 25856 7/1/2017 0
D 3226 9/1/2017 1

Any advice is more than welcome, I have several dataset in similiar format with huge amount of rows, and I need to automate this calcs to use results in the models.



Hi jolast,

Please find attached an example wf that should solve your issue.

Hope that helps,