cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
See how to use to use Text Explorer to glean valuable information from text data at April 25 webinar.
Choose Language Hide Translation Bar
View Original Published Thread

How to stack columns?

AlphaPony501
Level I

I have a data set with 22 subjects' active and placebo sides been tested for 4 times at 0w, 4w, 8w and 12w. Now I want to stack those columns of data (Active 0W, 4W, 8W,12W and Placebo 0W, 4W, 8W,12W)into one result column and also create two columns named Active/Placebo and Time to accurately describe each subject's result. I have attached the data table that I have and also the data table that I want to make. How do I do it?

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User


Re: How to stack columns?

Besides using formulas, you can also split the Label column with following:

  1. Select Label Column
  2. Go to Text to columns in Cols / Utilities / Text to Columns...
  3. Use space as delimiter
  4. Delete Label column and rename the columns
-Jarmo

View solution in original post

3 REPLIES 3
txnelson
Super User


Re: How to stack columns?

Use

     Tables=>Stack

to stack the columns

Then create 2 new columns using these 2 formula.  Both columns should be defined as character columns.

Foe the Acrive/Placebo column

word(1, :label, " ");

For the time column

word(2, :label, " ");
Jim
jthi
Super User


Re: How to stack columns?

Besides using formulas, you can also split the Label column with following:

  1. Select Label Column
  2. Go to Text to columns in Cols / Utilities / Text to Columns...
  3. Use space as delimiter
  4. Delete Label column and rename the columns
-Jarmo
AlphaPony501
Level I


Re: How to stack columns?

Thank you very much for helping out!!!!! It worked!!