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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.