{"id":4543,"date":"2024-01-27T09:15:07","date_gmt":"2024-01-27T09:15:07","guid":{"rendered":"https:\/\/himbap.com\/blog\/?p=4543"},"modified":"2024-01-27T09:15:07","modified_gmt":"2024-01-27T09:15:07","slug":"leveraging-power-bi-parameters-for-efficient-data-source-configuration","status":"publish","type":"post","link":"https:\/\/himbap.com\/blog\/?p=4543","title":{"rendered":"Leveraging Power BI Parameters for Efficient Data Source Configuration"},"content":{"rendered":"<p><strong>Introduction<\/strong><br \/>\nIn 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.<\/p>\n<p><strong>Details<\/strong><br \/>\nWhen we are done with the development and tested was over, thought of changing source from File-&gt; Options and settings -&gt; Data source settings<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2024\/01\/PowerBI1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-4545 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2024\/01\/PowerBI1-300x228.png\" alt=\"PowerBI1\" width=\"300\" height=\"228\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2024\/01\/PowerBI1-300x228.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2024\/01\/PowerBI1-624x474.png 624w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2024\/01\/PowerBI1.png 962w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>But as soon as we were changing URL, Power BI was detecting it and showing following error:<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2024\/01\/PowerBI2.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-4546 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2024\/01\/PowerBI2-300x20.png\" alt=\"PowerBI2\" width=\"300\" height=\"20\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2024\/01\/PowerBI2-300x20.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2024\/01\/PowerBI2-624x41.png 624w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2024\/01\/PowerBI2.png 790w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>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&#8217;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.<\/p>\n<p>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<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2024\/01\/PowerBI3.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-4547 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2024\/01\/PowerBI3-300x245.png\" alt=\"PowerBI3\" width=\"300\" height=\"245\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2024\/01\/PowerBI3-300x245.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2024\/01\/PowerBI3-1024x837.png 1024w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2024\/01\/PowerBI3-624x510.png 624w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2024\/01\/PowerBI3.png 1029w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>After that we can use Parameter under source for our table like below<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2024\/01\/PowerBI4.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-4548 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2024\/01\/PowerBI4-300x88.png\" alt=\"PowerBI4\" width=\"300\" height=\"88\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2024\/01\/PowerBI4-300x88.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2024\/01\/PowerBI4-1024x301.png 1024w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2024\/01\/PowerBI4-624x184.png 624w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2024\/01\/PowerBI4.png 1332w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>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.<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2024\/01\/PowerBI5.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-4549 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2024\/01\/PowerBI5-300x146.png\" alt=\"PowerBI5\" width=\"300\" height=\"146\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2024\/01\/PowerBI5-300x146.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2024\/01\/PowerBI5-624x303.png 624w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2024\/01\/PowerBI5.png 907w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p><strong>Summary<\/strong><br \/>\nIn 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.<\/p>\n<p>Hope it will help someone !!<br \/>\n<strong>Keep learning and Keep Sharing !!<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction 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&#8230; <a href=\"https:\/\/himbap.com\/blog\/?p=4543\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[847,21,402,522,1063],"tags":[1066,1065,1067,1064],"_links":{"self":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4543"}],"collection":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4543"}],"version-history":[{"count":3,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4543\/revisions"}],"predecessor-version":[{"id":4552,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4543\/revisions\/4552"}],"wp:attachment":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4543"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4543"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4543"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}