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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

how to replace reference of one sql table with another sql table

Hi all,

 

In Power BI Dashboard, We are using tables from Google - Bigquery. There are 8 tables imported and dashboards were developed.

Now per our requirement, we need to use "TableB_new" instead of "TableB". "TableB_new" is developed in Bigquery. I have imported this new table in PowerBI, but need to find a way to replace reference of TableB with TableB_new.

 

The reason being , the columns of TableB are refered in other tables as calculated columns.

How to make a universal change?

 

I tried using Advanced Query Editor to refer to TableB_new , but there is a column in TableB - "Market Final" which is present in TableB_new as "Market_final". This is causing the refresh to throw an error message "Market final" not found.

 

Could you please help with this issue

1 ACCEPTED SOLUTION
Vijay_A_Verma
Most Valuable Professional
Most Valuable Professional

Save a copy of your pbix file so that there is a backup. Now do following and do testing on new pbix file

1. After import of TableB_new, right click on it and rename it to TableB (It means that earlier TableB should be either removed or renamed. It is better to remove earlier TableB as keeping it will unnecessarily increase model size).

So, this takes care of Table issue.

2. There are two approaches to handle column issue

2.1 Copy your code from Advanced editor into Notepad and do Find and Replace All  of Market Final with Market_final

2.1 Another approach is that just rename the new column Market_final to old column Market Final in PQ. But this would mean an additional step in your query. Hence, 2.1 should be preferred. But if you are using multiple queries referring to this table, then better to rename it as it would avoid changing in multiple queries.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Thank you @Vijay_A_Verma , that worked for me . Highly appreciate your help

Vijay_A_Verma
Most Valuable Professional
Most Valuable Professional

Save a copy of your pbix file so that there is a backup. Now do following and do testing on new pbix file

1. After import of TableB_new, right click on it and rename it to TableB (It means that earlier TableB should be either removed or renamed. It is better to remove earlier TableB as keeping it will unnecessarily increase model size).

So, this takes care of Table issue.

2. There are two approaches to handle column issue

2.1 Copy your code from Advanced editor into Notepad and do Find and Replace All  of Market Final with Market_final

2.1 Another approach is that just rename the new column Market_final to old column Market Final in PQ. But this would mean an additional step in your query. Hence, 2.1 should be preferred. But if you are using multiple queries referring to this table, then better to rename it as it would avoid changing in multiple queries.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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