@Emily_DayI am not sure I understand your logic completely, but perhaps the following will help.
Names Default to Here(1);
dt = New Table( "Sample",
Add Rows( 3 ),
New Column( "Data",
Character,
"Nominal",
Set Values( {"1,2,3,6,11", "2,5,6,11", "3,11,12,13"} )
)
);
dt << Text To Columns(
delimiter( "," ),
columns( :Data )
);
dtStacked = dt << Stack(
columns( :Data 1, :Data 2, :Data 3, :Data 4, :Data 5 ),
Source Label Column( "Label" ),
Stacked Data Column( "Response" ),
Output Table Name("StackedData")
);
dtStacked:Response<<Data Type("Numeric");
dtStacked << New Column(
"Answer",
Numeric,
Nominal,
Formula(
"Insert your Logic Here"
)
);
dtWide = dtStacked << Split(
Split By( :Label ),
Split( :Answer ),
Group( :Data ),
Remaining Columns( Drop All ),
Sort by Column Property,
Ouput Table Name("WideData")
);