This demonstration workflow provides a "template" for building a cumulative calculation using a recursive loop.
The aim here is that only the nodes marked by Orange Annotation boxes need to be changed for this to work with just about any non-basic cumulative calculation. (By non-basic cumulative calculation, I mean any cumulative calculation that requires more than the use of the "moving aggregation" node, and normally involves a multi-column mathematical calculation).
The initial Table Creator would obviously be replaced by your input data. This must contain ALL columns that will be included during processing, so this includes an initialised placeholder column for any value being calculated. e.g. If you are calculating "Cumulative Balance" in the rules/maths nodes later, you must make sure that the Cumulative Balance column already exists at the start of processing.
The Column filter is modified to specify the columns to be retained (carried forward) to the next row's processing.
The Rule Engine and Math Formula nodes represent the place where any calculations take place. Other nodes may be used here as well as, or instead of , the Rule Engine and Math Formula nodes. The PREVIOUS row's brought forward value of any column is found in the PREV#colname version of that column. All columns included in the Column Filter at (2) will have a PREV#colname column created.
To use this workflow in KNIME, download it from the below URL and open it in KNIME:
Download WorkflowDeploy, schedule, execute, and monitor your KNIME workflows locally, in the cloud or on-premises – with our brand new NodePit Runner.
Try NodePit Runner!Do you have feedback, questions, comments about NodePit, want to support this platform, or want your own nodes or workflows listed here as well? Do you think, the search results could be improved or something is missing? Then please get in touch! Alternatively, you can send us an email to mail@nodepit.com.
Please note that this is only about NodePit. We do not provide general support for KNIME — please use the KNIME forums instead.