Relationships and the core table

Relationships tell DataPrism how the BI tables of a semantic model join, so that a filter on one table reaches the others. This page covers the core table, creating and editing relationships, and the rules they follow. For arranging the canvas itself, see Work with the diagram.

The core table

Every model has one core table at its centre: the table the other BI tables connect through. It is usually a fact table that holds the measures, such as orders or transactions.

Mark the core table

  1. Open the semantic model and click Diagram in its tabs.
  2. Point at the table you want. Its toolbar appears.
  3. Click Mark core. The tooltip reads "Mark as core table for this semantic model".

Mark core appears only while the model has no core table. To move the mark to another table, click Disable core on the current core table first, then Mark core on the new one. When the model has BI tables but no core table, a banner reads "Semantic model is missing a core table. Choose a BI table to mark as the core table."; pick a table in its Select BI table list and it is applied straight away.

Warning

Disable core deletes every relationship connected to the core table. The confirmation Disable core table? lists the relationships and warns: "All relationships connected to this core table in this semantic model will be deleted. This action cannot be undone." With no relationships yet, it reads "This will remove the core table mark from this semantic model." Removing the core table from the model clears the mark as well.

Create a relationship

On the Diagram tab:

Both open the Add relationship dialog:

  1. From table (fact) shows where the connection started. It is fixed, and it is always the fact side.
  2. Under To table, choose a Semantic model, then a BI table. The dialog's hint reads "Choose a semantic model and target table, then click a column header or cell to set the join key."
  3. Click a column header or cell in each preview to set the join key. Each side previews its columns and sample rows.
  4. Under Relationship options, set Cardinality, Cross-filter and Active (see the table below).
  5. Click Add relationship. It stays disabled until a target table, both join keys and a semantic model are chosen.

If the model has no other eligible tables, the target side reads "No bi tables to join" and offers Add new bi table.

The dialog enforces the model's rules before a relationship is saved:

Relationship settings

SettingWhat it doesDefault
CardinalityMany to one: many fact rows match one related row. One to one: each fact row matches at most one related row, and vice versa.Many to one
Cross-filterSingle: filters travel one way only, from the fact side to the related table. Both: filters can travel in both directions.Both
ActiveSwitches the relationship on. Turn it off to keep the relationship without using it.On

For how cardinality, cross-filter and uniqueness rules combine, with examples and a cheat sheet, open the Cardinality & cross-filter guide in the relationship dialog, or read Cardinality and cross-filter guide.

The line carries its state: an icon shows the cross-filter direction, with tooltips Cross-filter: Both directions or Cross-filter: Single direction (toward core table). An inactive relationship stays on the canvas as a dashed line.

Edit, switch off or delete a relationship

Dependency lines

Some diagrams also show dependency lines, which say that a table is built from another object, such as a view over a table. A dependency is not a relationship: it does not join two BI tables for reports. Double-click a dependency line to open it.

After a relationship changes

Let Model AI change relationships

Model AI can create, change and delete relationships, and set or clear the model's fact table. These changes wait for your approval unless the chat runs in Unrestricted; the approval card adds "Every chart of this model re-runs with the new join." and, when row-level security is on, "Row-level security predicates re-attach to the new join; with ANY joins the rows a group sees can change." The AI cannot change row-level security itself: it explains and suggests, and a person applies the change on the model's row-level security tab. See Model AI.

Permissions

To add, edit or delete relationships, you need the Edit DataPrism Semantic Model permission and edit access to the model. See Who can do what in DataPrism.

Questions, answered

Why can I not create a relationship between two dimension tables?

Every relationship in a semantic model must involve its core table, and the From table (fact) is always the fact side of the join. Connect each dimension table to the core table instead. If neither of the two tables is the core table, DataPrism refuses the connection and shows the Core table required dialog.

Why did DataPrism ask me to mark a core table while I was connecting two tables?

The model has no core table yet. The Core table required dialog offers the From and To tables; choose one and DataPrism marks it as the core table and continues the relationship you started.

Can I set one to one with single cross-filter?

No. One-to-one relationships always filter both ways, so the Cross-filter toggle is disabled at Both.

Why did my first relationship become inactive?

Two tables can have only one active relationship. When you add or activate another one, DataPrism asks you to confirm and switches the existing relationship off. To use the first one again, edit it, turn Active on and confirm; the other relationship is switched off in turn.

Why is the cross-filter toggle locked?

The table on the other side of the relationship, not the core table, has row-level security. Filtering both ways is enforced for it, so the toggle stays on Both, and its tooltip explains why. See Row-level security and View as.

Can I change the core table later?

Yes. Click Disable core on the current core table, then Mark core on the new one. Disable core deletes every relationship connected to the old core table, so you must create them again.

Why can I not change the To table while editing a relationship?

A saved relationship cannot be re-pointed: while you edit, the semantic model and the target table are locked. Delete the relationship and create a new one to connect different tables.

What happens if two people change the same relationship at once?

The second save is stopped by "This relationship was changed by someone else." Click Reload to see the other version, or Overwrite to keep yours.

My measures show as broken after I recreated a relationship. What now?

Click the re-check control on the broken-measures chip. Its tooltip reads "Re-check the broken measures, for example after recreating a relationship."

What does the No relationship label on a table mean?

The table has no relationship in this semantic model. Create a relationship from it to the core table to make it part of the star.

Why can I not edit relationships on a small screen?

On a phone or a narrow browser window, the diagram reads "The BI diagram editor requires a larger screen. Open this page on desktop to edit relationships." Open the page on a desktop-sized screen to edit.