Substitute value in a matrix

Hello there

i d like to know if it s a simple way to transofrm a matrix in another. I put example here


i ha the first column with client and the other columns with the products who ordered. For example client
6662304 ordered 2 of CY1, 2 of CY5 1 of CY9 and 4 of CY12.

I would like to know if there is a way to transform without make a huge table creator in this other table

where the numbers are replaced by the value in row 1 repeated by the times of each cell separated by ;

the next step i found a way by cell splitting node and ungroup so i ll have several rows (maype with a loop for each column is better,) but remains the problem that i don’t know ho to translate the first table to the second one. ( i know a method…transofrm one by one :slight_smile: )

Anyone may help me???

Thanks so much in advice

1 Like

Hi @Pippobaudo89

If I understood well your question, the following workflow should do the trick:

20220729 Pikairos Substitute value in a matrix.knwf (52.4 KB)

The second branch of the workflow is doing it all in one -String Manipulator (Multi Column)- node for efficiency.

Please reach out if you need any explanations about this solution.

Best
Ael

5 Likes

MAN THANK U SO MUCH

knime community is fantastic!

kudos

2 Likes

My pleasure @Pippobaudo89 :blush: !
Thanks for validating the answer and good luck with your project :wink:!
Cheers
Ael

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