Simple sorting/subtraction

Hi,

I am new on KNIME, and still learning a lot. But I seem to be stuck a bit with a simple sorting/subtraction problem.

I have the following example:

simple

1- I would like to make my table having the “C” row always coming as the first row (after the header). I saw the sorting function, but there I could just sort according to ascending/descending order, and not a specific string.

2- I would like to perform, in a new appended column, the subtraction of the values in reference to the “C” value.

FINAL

I believe that making the column “value” variables, and them performing math formula (variable), but how to add it in the same row the subtraction values?

If somebody have some helpful insight/guidance, it would be terrific!

Thank you very much :slight_smile:

Hi @fabioarrojo welcome to the forum

I was thinking of something like this simple_sorting.knwf (22.2 KB)
Knipsel

4 Likes

Hi there @fabioarrojo,

what would be string specific sort? As a workaround you can use Rule Engine to to create new column based on which you perform desired sort. For example if value is “C” in new column have value 1 else have value 0 and sort descending.

Welcome to KNIME Community!

Br,
Ivan

2 Likes

Hi @HansS,

Thank you very much! Your template helped me a lot! I was exactly what I was trying to do :slight_smile :slight_smile:

Have a great day!

1 Like

Hi @ipazin,

This specific string in my case would be the “C” (as you deduced) :slight_smile:

Thank you very much also for the suggestion/help! That is a nice way also to do it! I will optimize my template!

Have a great day!

1 Like

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