Creating a relationship between sheets in a multi-sheet file data source

A relationship joins logically related tables that the users want to combine in a single query.

About this task

Relationships Icon representing relationships can be created between sheets from the same multi-sheet file.

Important: The list of possible keys in the relationship editor excludes measures. Therefore, if a row in a column was misidentified as a measure, but you want to use it as an identifier, the row does not appear in the list of keys. You need to examine the metadata to confirm that the usage property is correct on each column in the table.

Procedure

  1. Go to the dashboard with the multi-sheet file.
  2. If necessary, enable edit mode by clicking the Edit icon until it is green with a checkmark Green Edit button.
  3. From the dashboard, click the Sources icon Sources icon.
  4. Select the sheets for which you want to create a relationship.

    You can use one of the following methods to select sheets:

    • Select a sheet from the metadata tree:

      In the metadata tree, click a sheet for the relationship. Click the More icon More icon, then click Create relationship.

    • Select two sheets from the metadata tree:

      In the metadata tree, press Ctrl and click the two sheets that you want to join in a relationship, then click Relationship.

    • Select a sheet from the Relationships tab in the data preview pane:

      Click the Show data icon Show data icon to open the data preview pane, then click the Relationships tab. Right-click a sheet for the relationship, then select New > Relationship.

  5. In the Create relationship dialog box, select the first sheet and the second sheet to include in the relationship.

    Depending on the method that you used to start the relationship, the first and second sheets might already be added. If both sheets are added, you do not need to select the sheets.

  6. Find the matching columns in both tables, then select Match selected columns.

    The matching columns are highlighted in the data grid. You might need to click Refresh to retrieve the data.

  7. Click Matched columns to specify the join operator for the match.

    In the Defined matches dialog box, select a join operator. By default, columns are matched based on similar values, by using the equal (=) operator. However, you can also match columns based on a range of values by choosing a different join operator. For more information, see Join operators in relationships.

  8. Click the relationship settings icon Relationship settings.

    By default, the relationship settings are detected from the source.

    Review, and if needed, modify the following settings:
    Relationship Type
    Specify one of the following relationship types:
    Inner join
    Include matching rows only.
    Left outer join
    Include all rows from the first table and matching rows from the second table.
    Right outer join
    Include matching rows from the first table and all rows from the second table.
    Full outer join
    Include all rows from both the first table and the second table.
    Cardinality
    Specify one of the following cardinality types:
    1-to-1
    Each row in the first table is related to exactly one matching row in the second table.
    1-to-many
    Each row in the first table has one or more matching rows in the second table.
    Many-to-1
    One or more rows in the first table match to a single row in the second table.
    Optimization
    Use the optimization filters to reduce the number of rows of data that are retrieved when the join is run. For more information, see Join optimization for relationships.
  9. Click OK.

What to do next

To view or edit all relationships that are defined for a multi-sheet file, click the Show data icon Show data icon to open the data preview pane, then click the Relationships tab. To view a relationship from the diagram, click the join line to open a graphical view of the relationship. To edit a relationship from the diagram, right-click the join line, then click Edit relationship.

To view or edit the relationships that are defined between two sheets, press Ctrl and click the two sheets in the metadata tree, then click Edit relationship.