The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
When multiple relations are created from the same table in a model.json file for data flow, they are not created automatically when creating a new Power BI desktop file.
This is the syntax from the Relationships section in the model file:
"relationships": [
{
"$type": "SingleKeyRelationship",
"fromAttribute": {
"entityName": "Sales",
"attributeName": "Month"
},
"toAttribute": {
"entityName": "Calendar",
"attributeName": "Period"
}
},
{
"$type": "SingleKeyRelationship",
"fromAttribute": {
"entityName": "Sales",
"attributeName": "What"
},
"toAttribute": {
"entityName": "Product",
"attributeName": "ProductID"
}
},
{
"$type": "SingleKeyRelationship",
"fromAttribute": {
"entityName": "Product",
"attributeName": "Fournisseur"
},
"toAttribute": {
"entityName": "Supplier",
"attributeName": "SupplierID"
}
}
]
Relations from Sales to Product and Calendar are not created.
Relation from Product to Supplier is.
When specifying only 1 relation on Sales, everything works fine.
Any ideas?