Forum Discussion
How to Transfer DAX Measures, Calculated Columns, and Relationships Between Two Power BI Datasets
- 6 months ago
Tabular Editor is generally safe from a data-security perspective when used normally. It works primarily with model metadata, not the underlying data.
- 6 months ago
Power_Be_Eye some other optons you can consider too..
ALM toolkit.
This tool compares two datasets and lets you:
See differences
Select what to deploy between them
Push only measures / relationships / columns
Again, requires XMLA endpoint.
Lastly, TMDL view.
If you're using the newer model format:
Open the source PBIX
Go to TMDL View
Copy the model definition files
Paste into the target model
Sharing for reference , HTH.
- 6 months ago
You can use TMDL
Paste that into the TMDL view of the other dataset. This will overwrite existing tables and columns and create any new ones that don’t yet exist. Before clicking Apply, remove all lineage tag lines. For calculated columns and measures that exist in the source but not in the target dataset, those will be removed so handling them will require a fairly manual process.
ANS:
PBIR (Power BI Project) format can significantly help for simplify transferring measures, calculated columns, and relationships between datasets, especially when the tables and schema are identical. Here’s how you can approach this:
Convert PBIX Files to PBIP
- Open your source PBIX in Power BI Desktop.
- Go to File → Save As → Power BI Project (.pbip).
- Repeat for your target PBIX.
This creates a folder structure containing model.bim and individual table JSON files.
Transfer Measures
- Open definition/tables/<TableName>.json in the source project.
- Locate the "measures" section.
- Copy the relevant measures and paste them into the corresponding table JSON in the target project.
NOTE: Ensure that table and column names exist in the target model, as any missing dependency will cause errors.
Transfer Calculated Columns
- In the same table JSON file, identify columns where "type": "calculated".
- Copy and paste these into the corresponding target table.
Transfer Relationships
- Open definition/model.bim.
- Locate the "relationships" array.
- Copy the relationships and paste them into the target model.bim.
NOTE: Make sure the referenced tables and columns match exactly; otherwise, the model may fail to load.
Reload the Target Project
After merging, open the target .pbip in Power BI Desktop. Power BI will rebuild the model with all measures, calculated columns, and relationships intact.
Considerations
- JSON syntax must remain valid.
- Column and table names must align with the target model.
- IDs and unique identifiers in the model should not conflict.
- For complex calculation groups or large models, validate carefully after merging.
Why This Approach Is Recommended
- Bulk copy: Transfer dozens or hundreds of measures at once.
- Version control friendly: PBIR works well with Git or other source control systems.
- Structured and safe: Reduces the risk of manual errors.
- Scalable: Ideal for enterprise environments where multiple datasets share common business logic.