Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
6 | |
6 | |
3 | |
2 | |
2 |
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
3 |