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.
Hi all,
On unzipping a .pbix or .pbit file we get a DataModelSchema and Mashup file I trying to feed in the metadata frim json input to these files and zip back all the files and make it a .pbix or .pbit file.
But in DataModelSchema file I have given relation metadata information between columns from tables ORDER_ITEMS and ORDERS and the columns are ORDER_ID(ORDER_ITEMS) and ORDER_ID the column names are different but the values are same
so Once I open a created .pbix it asks for apply changes and after clicking it relationships are disappeared.Before clicking apply changes if i see the data model view relationships are created as I have given in metadata file with required cardinality from ORDERS to ORDER_ITEMS between columns ORDER_ID(ORDER_ITEMS) and ORDER_ID.
after apply changes will power bi not take the relations given in metadata or column name should be similar?or is power bi autodetecting relation based on similar columns
Please help
relation in metadata DataModelSchema file
"relationships": [
{
"name": "VP5UWUBR",
"fromTable": "ORDERS",
"fromColumn": "ORDER_ID",
"toTable": "ORDER_ITEMS",
"toColumn": "ORDER_ID (ORDER_ITEMS)",
"state": "ready",
"crossFilteringBehavior": "bothDirections",
"modifiedTime": "2020-07-09T12:26:18.966667",
"refreshedTime": "2020-07-09T12:27:59.303333",
"toCardinality": "many"
}
]
HI @sheetalshettiga,
Have you turned the 'relationship detect' options on the power bi desktop which may change the current relationships?
Create and manage relationships in Power BI Desktop
BTW, relationships are stored in a data model file, I don't think you can directly modify pbix file settings to quick generator/modify the relationships of data models tables. We do not recommend you to modify the internal files of pbix, these operations may break your report file and it is hard to be fixed.
Model relationships in Power BI Desktop
Regards,
Xiaoxin Sheng
User | Count |
---|---|
5 | |
3 | |
2 | |
2 | |
2 |
User | Count |
---|---|
11 | |
7 | |
4 | |
4 | |
4 |