| pbi_schema_relation_create | R Documentation | 
Defines a relationship between tables in a Power BI push dataset. To add this definition to a Power BI dataset schema, use pbi_schema_add_relations().
pbi_schema_relation_create(
  from_table = NULL,
  from_column = NULL,
  to_table = NULL,
  to_column = from_column,
  direction = c("OneDirection", "BothDirections", "Automatic"),
  name = paste0(from_table, to_table, from_column)
)
| from_table | The name of the foreign key table | 
| from_column | The name of the foreign key column | 
| to_table | The name of the primary key table | 
| to_column | The name of the primary key column. Defaults to from_column | 
| direction | The filter direction of the relationship. Defaults to 'OneDirection' | 
| name | The relationship name and identifier. Defaults to a concatenation of from_table, to_table and from_column | 
A data.table
# An example
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.