Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
P3Sven
Advocate I
Advocate I

Change Datesource in Power Query deletes Relations in Datamodel

Hi lovely Community,

 

Short issue task description:

I wanna shift some heavy Power Queries to Dataflows. So I've copied Code 1:1 to Power Bi Dataflows, works fine.

Now I would like to change my original Datasource to new prepared Dataflow.

Old Way: Dataverse > Datamodel

New Datasource: Dataverse > Dataflows > Datamodel

 

Issue:

After loading to data model, all relations regarding my prepared table are gone. Although all Column Names / Types are the same..

 

Already tried:

- Disabling Auto Detect Relationships.

- Only replacing first lines of Power Query Code, not the last finish line

- Step by Step replace: First loading new Dataflow Source as new table, after replacing the old table with the Datasource code

- Referenced Power Query with new Dataflow as Datasource for old table as Datasource

 

Any ideas why all relations will be deleted with changing Data Source? Is it cause of Displaynames of Dataverse Connector? So changing the datasource will miss metadata?

 

Need to shift multiple Power Queries to Dataflow and don't want to build up datamodel again with all relations..

 

Thank you in advance!

 

BR,

Sven

2 REPLIES 2
DataInsights
Super User
Super User

@P3Sven,

 

You could try copying the relationships using Tabular Editor. This is a free tool that allows you to edit the tabular model.

 

1. Save the old pbix as a new pbix and replace the Power Query code with the dataflow code. The relationships will disappear.

2. While the new pbix is open, open the old pbix (both files should be open).

3. Open Tabular Editor (TE) within each pbix.

4. In TE-old, copy the relationships.

5. In TE-new, paste the relationships.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi @DataInsights ,

 

thank you! Its a nice workarround if we have a "changed" table and need to shift some relations to it.

But for me its not the "right" solution cause I've copied everything 1:1 and just have changed the data source. All columns, all data types the same and PBI deletes all relations. 

@v-xiaosun-msft:

Unfortunately its not a solution for me. Do you have an idea why everything will deleted by PBI although all columns are the same?

 

BR,

Sven

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors