pbi_create_relationship
Create or update a single-column relationship between two tables in Power BI. Supports cardinality, cross-filter direction, and active state with optional overwrite to avoid duplicates.
Instructions
Create or update a single-column relationship.
With overwrite=False (default), raises PowerBIDuplicateError when
a relationship between the same endpoint columns already exists. With
overwrite=True the existing relationship is updated in place
(cardinality / direction / is_active refreshed) and the response carries
action="updated".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to_table | Yes | ||
| direction | No | oneDirection | |
| is_active | No | ||
| overwrite | No | ||
| to_column | Yes | ||
| from_table | Yes | ||
| cardinality | No | oneToMany | |
| from_column | Yes | ||
| relationship_name | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |