Hi @nhun,
Welcome to the community!
This is pretty easy to do in just a short amount of code. Here's one way that loops through the column names and inserts the ones with the matching substrings into a list we can use with Stack. I use the Thickness data set from the Sample Data Library.
dt = Open("$SAMPLE_DATA/Quality Control/Thickness.jmp");
stack_cols = {}; //list to hold the names of columns I want to stack
str_match = "Thickness"; //Substring in column name I want to find
names = dt << Get Column Names;
for(i=1,i<=N Items(names),i++,
If(Contains(char(names[i]),str_match) > 0,
Insert Into(stack_cols, names[i])
)
);
dt << Stack(
columns(stack_cols),
Source Label Column( "Label" ),
Stacked Data Column( "Data" )
);
You would just need to replace the dt with your own table and str_match = "Vol Density"
-- Cameron Willden