SPSS Statistics

SPSS Statistics

Your hub for statistical analysis, data management, and data documentation. Connect, learn, and share with your peers! 

 View Only
Expand all | Collapse all

How to create new variable column by choosing values from exisiting columns?

  • 1.  How to create new variable column by choosing values from exisiting columns?

    Posted Tue July 27, 2021 02:43 PM

    Is there is way to pull certain values in existing columns to create a new column using a specific order of priority? I want to prioritize 3, then 1, and then 2. So, for example, if the data is as follows:

    Column1 Column2

    1 3

    2 3

    1 2

    The new column variable should be:

    NewColumn

    3

    3

    1






    #SPSSStatistics
    #Support
    #SupportMigration


  • 2.  RE: How to create new variable column by choosing values from exisiting columns?

    Posted Tue July 27, 2021 04:59 PM

    Look up DO IF in the Command Syntax Reference.






    #SPSSStatistics
    #Support
    #SupportMigration