Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Replace References - changing data sources

I am connected to a PostgreSQL database and have created several reports from a table contained within this database.  For simplicity, lets call that table_1.  To hopefully speed up my connections an...
  • nirvana_moksh's avatar
    7 years ago

    Anonymous - You can first create a new connection to this data source and once the preview is loaded in Power Query mode, click on Advanced Editor and copy the script for the establishment of the connection to the newly created view. Go to your existing query and click on the Advanced Editor for that query and replace the string that you see after 'Let source' for your table with this and make the necessary changes in the script like making sure the commas are in place, and that the proper reference names are listed after "#"

     

    Edit - Also, as a best practice I always declare Parameters for Server Name, Database Name etc, which you can utilize too, so as to make these kinda changes a little more easier.