I think stack should be able to do this when using Multiple series stack. Data types should be same for all columns (at least in this method)
and then remove label columns. Changing the options in stack platform might make it even more clear, but I haven't used multiple series stack, but it is very powerful. I'll tag @Jeff_Perkinson here, because I have seen him use it multiple times and might have better settings for it than I do.
Names Default To Here(1);
dt = New Table("Untitled",
Add Rows(1),
New Column("Column 1", Character, "Nominal", Set Values({"x1"})),
New Column("Column 2", Character, "Nominal", Set Values({"1"})),
New Column("Column 3", Character, "Nominal", Set Values({"1.1"})),
New Column("Column 4", Character, "Nominal", Set Values({"1.11"})),
New Column("Column 5", Character, "Nominal", Set Values({"x2"})),
New Column("Column 6", Character, "Nominal", Set Values({"2"})),
New Column("Column 7", Character, "Nominal", Set Values({"2.2"})),
New Column("Column 8", Character, "Nominal", Set Values({"2.22"})),
New Column("Column 9", Character, "Nominal", Set Values({"x3"})),
New Column("Column 10", Character, "Nominal", Set Values({"3"})),
New Column("Column 11", Character, "Nominal", Set Values({"3.3"})),
New Column("Column 12", Character, "Nominal", Set Values({"3.33"}))
);
// data types must be same for stack, so you might have to script it
dt_stacked = dt << Stack(
columns(
:Column 1, :Column 2, :Column 3, :Column 4, :Column 5, :Column 6, :Column 7,
:Column 8, :Column 9, :Column 10, :Column 11, :Column 12
),
Source Label Column("Label"),
Stacked Data Column("Data"),
Stack By Row(0),
Number of Series(4),
Contiguous
);
For Each({col_name}, dt_stacked << get column names("String"),
If(Contains(col_name, "Label"),
dt_stacked << Delete Columns(col_name)
);
);
-Jarmo