KNIME REPLACE VALUES

I have a column with values from 0-11. I want to replace this to range from 1-12.
For example the value 0 should be 1, the value 1 should be 2. etc in the updated list.

Welcome to the forum @manvim.

There are several ways to do this. I think the simplest would just be a math formula node that adds 1 to each value in the column.

6 Likes

That’s right. More than 1 ways to approach this. Math Formula Node can also be used differently with similar results. If your numbers have not yet been formatted to numbers , you’ll have to use the String to Number Node first before you run the +1 calculation as suggested by @elsamuel .

A quicker way to bypass that is by assigning row index using the Math Formula Node. By default, the index starts with 0, so you’ll edit the formula by adding 1, shown as below:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.