Creating a new character column by sorting multiple columnsamerican_indian | asian | black | declined_race | multiracial | pacific_islander | unavilable_race | white |
0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
Is there a simple way (without a script) to create a new column (race) that can sort each of the individual columns information? I would like the new column to be something like this:
.
american_indian | asian | black | declined_race | multiracial | pacific_islander | unavilable_race | white | Race |
0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | white |
0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | asian |
0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | white |
0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | black |
0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | white |
0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | white |
1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | american_indian |
0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | white |
Automation and ScriptingConsumer and Market ResearchData Blending and CleanupMass CustomizationQuality and Process EngineeringRe: Creating a new character column by sorting multiple columnsThank you! That was easy
Re: Creating a new character column by sorting multiple columnsSelecting the columns you want to combine and then choosing Cols->Utilities->Combine Columns... from the menu will give you a dialog box in which you can specify the new column name and then check the "Selected Columns are Indicator Columns" box. Clicking OK will create the column you are looking for. Note that if a row could have more than one "1" you should also check the "Multiple Response" box, in which case, the entry in the new column will be the column names concatenated by the character chosen for delimiter ("," is the default).
Hope this helps.
-Jerry
Re: Creating a new character column by sorting multiple columnsCan be done by a formula using the if statement, there you are most flexible and can use conditions on other columns or even combinations of columns.