cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gargdeepak83 Frequent Visitor
Frequent Visitor

power bi desktop

Dear Team,

 

We are using Power BI Desktop (Feb 2018) version with Direct Query mode and connected to Azure SQL database. 

 

While changing the environment from DEV to QA or QA to PROD, we have to open the application and change the connection and then Power BI takes a lot of time of refresh all the tables (we have approx. 80 tables). 

 

Is there any way by which we can automate this and without open the application, can change the connection. Eg. like VBScript file, PowerShell.

 

Please suggest.

1 ACCEPTED SOLUTION

Accepted Solutions
v-yulgu-msft Super Contributor
Super Contributor

Re: power bi desktop

Hi @gargdeepak83,

 

As of now, Power BI does not support to update the datasource connection programmatically without openong the .pbix file. Here is an idea, you can click to vote it up.

 

To workaround this requirement, you can store your connection string in a config file, then write a custom function to analysis this file. Each time you refresh the report, it will get the newest data via new connection string. Please refer to v-shex-msft's suggestion.

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yulgu-msft Super Contributor
Super Contributor

Re: power bi desktop

Hi @gargdeepak83,

 

As of now, Power BI does not support to update the datasource connection programmatically without openong the .pbix file. Here is an idea, you can click to vote it up.

 

To workaround this requirement, you can store your connection string in a config file, then write a custom function to analysis this file. Each time you refresh the report, it will get the newest data via new connection string. Please refer to v-shex-msft's suggestion.

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Users Online
Currently online: 157 members 1,580 guests
Please welcome our newest community members: