This article describes how to bring a variable over from one linked data set to another. This is useful for when you wish to make calculations that require all your variables to be in the same data set.
- A document with two data sets loaded in the Data Sets tree.
- An Edit Relationship between the files. See How to Link Data Sets Together in a Document for details.
1. Select the Data Set folder in the Data Sets tree where you wish to add the variable. In this example, our data set is called File1 and we are bringing a variable over from File2.
You can also enter this manually using the below format:
The source_variable_name will match Properties > GENERAL > Name, and the source_data_set in this case would be File2.
4. Change Properties > Structure to the correct data type.
5. OPTIONAL: If you are copying over a categorical variable such as Nominal or Ordinal, it will only carry over the values. You can, however, copy over the labels by doing the following:
- To copy the labels, select the source variable in the Data Sets tree and go to Properties > DATA VALUES > Labels > Export > CTRL + C.
- To then apply this to your new variable, select it in the Data Sets tree and go to Properties > DATA VALUES > Labels > Import > CTRL + V > OK.