Swapping values inside a table

Hi @just-n-guy-en-charge!

Welcome to KNIME community!

If I got it right you use Lag Column node to get data in format from your first print screen. In my opinion I would skip that part and using only first column create others with workflow like this:

Basically loop over each row and using Constant value Column and Column Expressions nodes create one column in each iteration. There is a lot of flow variables in this workflow so you want to check how they work if haven’t yet.

There might be an easier solution but in any case afraid you can not avoid some code writing.

Workflow is attached. If any questions feel free to ask.

2019_03_28_Lower_Triangular_Matrix.knwf (27.7 KB)

Br,
Ivan