Forum Discussion
how to replace reference of one sql table with another sql table
- 4 years ago
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.
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.