Merging Score Data with Customer Data

Now that you have a dataset that contains RFM scores, you need to match those scores to the customers. You could merge the scores back to the transaction data file, but more typically you want to merge the score data with a data file that, like the RFM score dataset, contains one row (record) for each customer -- and also contains information such as the customer's name and address.

Figure 1. RFM score dataset in Variable View
RFM score dataset in Variable View
  1. Make the dataset that contains the RFM scores the active dataset. (Click anywhere in the Data Editor window that contains the dataset.)
  2. From the menus choose:

    Data > Merge Files > Add Variables

    Figure 2. Add Variables, select files dialog
    Add Variables, select files dialog
  3. Select An external data file.
  4. Use the Browse button to navigate to the Samples folder and select customer_information.sav. See the topic Sample Files for more information.
  5. Then click Continue.
    Figure 3. Add Variables, select variables dialog
    Add Variables, select variables dialog
  6. Select (check) Match cases on key variables in sorted files.
  7. Select Both files provide cases.
  8. Select ID for the Key Variables list.
  9. Click OK.

    Note the message that warns you that both files must be sorted in ascending order of the key variables. In this example, both files are already sorted in ascending order of the key variable, which is the customer identifier variable we selected when we computed the RFM scores. When you compute RFM scores from transaction data, the new dataset is automatically sorted in ascending order of the customer identifier variable(s). If you change the sort order of the score dataset or the data file with which you want to merge the score dataset is not sorted in that order, you must first sort both files in ascending order of the customer identifier variable(s). See the topic Add Variables for more information.

  10. Click OK to merge the two datasets.

The dataset that contains the RFM scores now also contains name, address and other information for each customer.

Figure 4. Merged datasets
Merged datasets