Icon

251104_​Aggregation

Please see attached Excel file (which I got off my workflow).

  1. Col F (called ppp) is what I am trying to reproduce in KNIME.

  2. Data is grouped by Age LBD (col A). For each Age LBD, there is a Age_LBD_Proj (col D) which is a person aging by 1 more year for which I need to calculate their ppp current = cumulative ppp (cell above) x (1 - q of current row).

  3. At the end of a specific Age LBD, I need to repeat the above process for the next Age LBD.

  4. The final output will need to be pivoted by Age LBD and 50 columns with ppp for each Age LBD for that projection year (1 to 50).

  5. Where there is no data for a particular projection year then that ppp becomes missing value.

How can I sensibly do this in KNIME?

Short way via Expression Node

long way via lag column etc

if($["Proj_Years_Count"]==1, $["q"],$["ppp",-1]*$["q"])
Expression
Excel Reader
Lag Column
Loop overeach Age group
Group Loop Start
Column Filter
Loop End
ppp_raw = 1 - q
Math Formula
Math Formula
Moving Aggregator
Column Merger

Nodes

Extensions

Links