I am trying to restructure my table data as follows:
- the "category" column values will be appended as new columns to existing table, and the values of the new columns will be taken from the intersection between "category" and "value".
table data -> "One to Many" -> "Rule Engine" -> "Rule Engine" -> "Rule Engine"
Note: the "rule engines" are used to replace the "1" values for the new columns with the actual value from the original row/column.
However, this is done manualy: I added one "Rule Engine" for each category value. If another category value will show up, I have to add another "Rule Engine" manualy. Is there a way to accomplish that automaticaly?
Just use Missing Value Node to replace "?" by "0". Define it using the variable type, that way it does not depend on any variable or category names.
Depending on whether you still need the category and value variables, a Pivot node would have done instead of the One To Many. I don't remember whether Pivot allows to handle missing values automatically or not. Another solution to explore.
Excellent! Thank you, Geo. I got it to work with a pivot table per your suggestion. I had to create some additional columns to make the groups unique, but it worked out in the end.