Year to Date columns

Hi everyone,
I am rather new to knime and struggling over a rather common problem for us.
We have columns for values e.g. for January til December and we want to cumulate these to have additional columns with the values of Jan, then Jan + Feb, Jan + Feb + March etc.

I tried several loop variant but was not able to achieve the solution for this problem.
What would be the best option?
Thanks
Uwe

Look at Moving Aggregation node.

Thanks you very much.
I was able to do it with the Moving Average node, however, the node cumulated the figures for each column down the rows. I actually needed to cumulated each row along the columns.
I was able to manage it together with the Transpose node for a small example. I will have to check, how this works if I have a couple of ten thousand rows.
Uwe

Look at Column Aggregator too.

Maybe you should consider transposing / pivoting / unpivoting your data.
KNIME is a very powerful tool if the data is in an appropriate format.
KNIME also offers nodes to transform data in more useful formats / layouts.

Before looking for a node that is exactly doing what you’re looking for, be sure your data is in a shape fitting your needs.

Keep up working with KNIME and kind regards,

Patrick

I think this is a task for a Math Node or a java node. I will see if I can provide an example later. Or maybe you can upload one from where to take it.

I did something with Java, it does the job but I am not sure if there is not a more elegant way (Pivot like @Patrick1974 mentioned …). So I will upload it for educational purposes. To declare the variables I had to click them in the Java Snippet. I wonder if there is a faster way. I like to prepare code in Excel and then copy it to where I need it.

And yes there might be better functions in Java for this …

kn_example_jan_dec_agg.knwf (28.1 KB)