Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

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...
  • Vijay_A_Verma's avatar
    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.