Leveraging Power BI Parameters for Efficient Data Source Configuration

In a recent project involving Power BI, our focus was on establishing connections to an on-premise Business Central instance. To access the business sandbox, customer opened sandbox service port for us. Additionally, for production purposes, we configured a Data Gateway within the Power BI service. However, upon completion of development, we encountered an issue during the deployment of the Power BI report to the Power BI service. Specifically, we struggled with modifying the connection string. In this post, I will outline the steps we took to address and resolve this issue effectively using Power BI Parameters.

When we are done with the development and tested was over, thought of changing source from File-> Options and settings -> Data source settings

But as soon as we were changing URL, Power BI was detecting it and showing following error:

And when used apply changes options it was failing as we were not able to access production service our development machine just like sandbox because it’s port was not opened. First we thought of publishing it without saving changes but in Power BI service there was not option to change the data source and our report was still conning to the sandbox only.

To solve this issue, we utilized, Parameters!. Power BI Parameters serve as dynamic placeholders for values that can be modified directly within Power BI Desktop or through the Power BI Service. We used for data source connections. We can use Transform data options and can setup Parameter like below

After that we can use Parameter under source for our table like below

After this change we can refresh our Power BI report and deploy to Power BI Service. In the Power BI service while scheduling refresh we can update parameter and use Product URL.

In this post we discussed how we can leverage Power BI Parameter to use make data source configurable. This is very useful when you want to connect to different data sources.

Hope it will help someone !!
Keep learning and Keep Sharing !!

Leave a Reply

Your email address will not be published. Required fields are marked *