More Examples


As mentioned in other topics about working with multiple data tables in one visualization, the recommended setup is that you base your visualization on a main data table where all the categories you want to group the visualization by are included. Preferably the categories you want to group by are also located in all the data tables. However, this may not always be the case, and this topic gives two examples of how you can set up useful visualizations when your data is not arranged that way.

Using Labels to Show Data from Other Data Tables

Perhaps you have the following three data tables:

md_label_from_non-main_dt_dt.png

And a visualization has already been created with the 'Sales' data table as the main data table:

md_label_from_non-main_dt_scat_plot1.png

The X-axis shows sum of target, which is data that originates in the 'Targets' data table. The Y-axis shows sum of sales, which is data that comes from the 'Sales' data table (the main data table). The markers represent the different accounts, which is also data from the main data table. The visualization shows how each of the accounts have performed compared to their targets, but it might also be interesting to see which person is responsible for which account. But in the main data table there is no information about the account manager so it is not possible to group by account manager. However, the data table named 'Managers' contains information about which person is manager for which account, and it is possible to get that information into the visualization by using labels as aggregated values rather than grouping categories.

  1. Open Visualization Properties and go to the Labels page.

  2. Open the Label by column selector.

  3. Select the 'Managers' data table and then the 'Account Mgr' column.

  4. Select UniqueConcatenate as aggregation method.

  5. Choose Show labels for > All markers.

  6. Response: The scatter plot now displays labels with the account manager name for each of the accounts, as seen in the image below.

md_label_from_non-main_dt_scat_plot2.png

Adding Columns Instead of Using Multiple Data Tables in a Visualization

In the example above it was possible to add data from another data table as aggregated values rather than adding them as grouping columns. But in some cases it is a better approach to add a column from another data table to the main data table. That way you can use the column to group the visualization by. For example, if you do need to use the 'Account mgr' column on a grouping axis you can insert the column from the 'Managers' data table into the main data table instead.

  1. Open the Insert menu and select Columns....

  2. Select the 'Sales' data table under Add columns to data table.

  3. In the Insert Columns - Select Source dialog, click Select and scroll down to the From Current Analysis section, then click on the  'Managers' data table.

  4. In the next step, match 'Account No' to 'Account No', then click Next.

  5. In the next step, select 'Account Mgr' under Columns to add from new data.

  6. Select Left outer (rows from current data only) as join method, then click Finish.

  7. Response: The 'Account Mgr' column is now included in the main data table, and you can use it to group the visualization. See How to Insert Columns to learn more about inserting columns.

When the 'Account Mgr' column has been added to the main data table, you can group the visualization by that column, as seen in the visualization below:

md_example_add_column.png

Note that you will get a warning in the visualization because the 'Account Mgr' column does not have a match in the 'Targets' data table. In this case it is actually not a problem, and you could turn the warning off. Read more about when and how you can disregard this warning in Column Matching.

See also:

Multiple Data Tables in One Visualization

Column Matching

Working with Multiple Data Tables in One Visualization