For the latest version of JMP Help, visit JMP.com/help.


Using JMP > Reshape Data > Virtually Join Data Tables > Example of Virtually Joining Columns
Publication date: 04/30/2021

Example of Virtually Joining Columns

Suppose that respondents in a pizza experiment chose their favorite crust, topping, and cheese. To see which cheese the respondents preferred, follow these steps:

1. Select Help > Sample Data Library and open Pizza Profiles.jmp and Pizza Responses.jmp.

2. First, right-click the ID column in Pizza Profiles.jmp and select Link ID.

This column contains unique values that correspond to values in Pizza Responses.jmp. For example, row one in Pizza Profiles.jmp indicates that pizza with thick crust, mozzarella cheese, and pepperoni toppings is nicknamed ThickOni. When all responses in Pizza Responses.jmp are “ThickOni”, the subject chose pizza with these attributes.

3. In Pizza Responses.jmp, select the three columns that begin with “Choice”.

4. Right-click and select Link Reference > Pizza Profiles.jmp.

The selected columns are linked to the ID column in Pizza Profiles.jmp and appear in the main data table’s Columns list (Figure 6.36).

Note: Look at one of the column’s Link Reference properties again and notice that the Pizza Profiles.jmp data table is selected. See Virtual Join Properties in the The Column Info Window section for information about changing the link.

5. In Pizza Responses.jmp, select Analyze > Distribution.

6. Scroll down to select the three Cheese columns in the referenced column groups, click Y, Columns, and click OK.

Figure 6.37 Distribution Launch Window 

More respondents chose Mozzarella in the Choice column. In Choice1 and Choice2, the proportion of Mozzarella to Jack is nearly even.

Figure 6.38 Distribution of Pizza Responses 

Notes:

See the Movie Rentals.jmp sample data table for another example of virtually joined columns. The data are already joined with Movie Customers.jmp and Movie Inventory.jmp, so you do not need to specify the Link Reference.

A data table can have only one Link ID column property. The Link ID column cannot have duplicate values.

A data table can have multiple referencing columns. The columns can reference different or the same data tables.

A referenced data table can also have a referencing column (a column that references another data table).

If the Link Reference column property is removed from the column, or the referenced data table is closed, the corresponding referenced columns are removed from the main data table.

The data types of the linked columns must match.

The Expression and Row State data types do not support the Link Reference or Link ID column properties.

When the main data table is saved, the Link Reference column property is saved, but referenced columns are not saved. The data tables are relinked when you open them.

When a referenced data table is renamed, the corresponding Link Reference column property is automatically updated.

Referenced columns are not included when you select Copy Table Script from the Table panel red triangle menu.

Select Row State Synchronization options to synchronize row states in data tables that contain virtually joined columns. See Example of Virtually Joining Columns and Showing Row States.

A column can have both Link ID and Link Reference column properties.

Tips:

In addition to right-clicking a column to add the Link ID and Link Reference column properties, you can add the properties through the Column Info window. See Virtual Join Properties in the The Column Info Window section.

You can specify that the linked column name be used in virtually joined columns that are shown in the Columns list. This option lets you specify a shorter column name (for example, Cheese instead of Cheese[Choice]). In the Link Reference column property, select Use Linked Column Name. You can also manually rename the column as usual.

To share the data with another user, you might want to merge the data so that the data tables are permanently joined. This option is helpful because you provide one data table, not the main and auxiliary data tables. To merge the joined columns into the table that has a link reference, select Merge Referenced Data from the red triangle menu in the data table’s left pane. The data are replicated from the auxiliary data table to the main data table. When you save the main data table, the actual data are also saved. The Link Reference column property is removed from the referencing column in the main data table. See Example of Merging Referenced Data in Virtually Joined Data Tables.

Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).