I am creating push datasets programmatically and binding them to some standard Power BI report templates. The creation of the datasets is being done using the Power BI REST API.
My templates require some tables within the datasets to be relationed to one another, some with a cardinality of one-to-one, one-to-many, etc.
According to the API documentation, relationships can be defined as follows:
'relationships' => [
[
'name' => 'A to B',
'fromTable' => 'A',
'fromColumn' => 'A_column',
'toTable' => 'B',
'toColumn' => 'B_column',
'crossFilteringBehavior' => 'BothDirections',
]
],
.
.
.
With the above six fields being referenced by the docs.
However, when I analyze the .bim file associated with the template that was created using Desktop, there is a toCardinality
field. When I try to create a dataset with this field specified in my request body, creation of the dataset fails.
Does anybody know how to define the cardinality, if at all possible, using the REST API?