SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

How do I combine multiple columns

Reply
Occasional Contributor
Posts: 17

How do I combine multiple columns

I have a spreadsheet from a survey that contains multiple column results for one question.  There is a separate column for each possible response to the question.

 

Is there a way to combine these into one?

 

thank you for any assistance!

 

Example:

Affiliated Units     Affiliated Units     Affiliated Units     Affiliated Units

8MICU

                            8MPCU

                            8MPCU

                                                                                  10MPCU

8MICU            

                                                        9MICU

                                                        9MICU

 

 

 

 

Super User
Posts: 17,784

Re: How do I combine multiple columns

COALESCC function if only one response. 

If multiple responses use CATX to include a separator 

Occasional Contributor
Posts: 17

Re: How do I combine multiple columns

thank you!

Super User
Posts: 10,483

Re: How do I combine multiple columns

And in the interest of "fix it as early in the process as possible" I would examine the settings in you your survey software. Some survey data collection programs I have worked with have 2 or more data "export" formats with the default often as you are describing. The fun parts are finding the settings for the multiple response type questions but often you can create an export profile that makes things easier in the long run, at least if you use the same survey (or data collection approach) multiple times.

Ask a Question
Discussion stats
  • 3 replies
  • 312 views
  • 2 likes
  • 3 in conversation