Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
amaleranda
Post Patron
Post Patron

Change connection string of get data based on different clients

Hello PowerBI Gurus,

I have a requirement as below

 

- data is hostted in a web API. (there are three diffrent locations) means I have three diffrent API links. 

   1) http://mail.companyinfo.com.au:6066/DS/REST/TServerMethods1344/getCompanyData/DEX/GetJYPBPOSTJC/Budget Data

  2) http://mail.companyinfo.com.au:6066/DS/REST/TServerMethods1344/getCompanyData/DEX/GetJKPost/- Actual Data

 3) http://mail.companyinfo.com.au:6066/DS/REST/TServerMethods1344/getCompanyData/SOM/GetOpen/PO Data

 

-I have created a report using those links and it works fine. 

Now I have  5 diffent clients. I need to use the same PBIX file so they can dynamically change their server names. 

Only thing change for the new clients are mail.companyinfo.com.au:6066 part of the sting. Is there any way I can prompt user to enter different part in a parameter before they extract their data  so new clints dynamic part would be 

classic-france.nykensanalytics.com:6056 instead of mail.companyinfo.com.au:6066 is there anyway I can achieve this. below is a example of my PowerQuery.  All three PowerQueries for each link is similar transformaton. 

 

Dynamic query.PNG

1 ACCEPTED SOLUTION
Mariusz
Community Champion
Community Champion

Hi @amaleranda 

 

Sure, you can use the parameters as per below.

Create ParameterCreate Parameter

Adjust your M code as below.

source = Json.Document( Web.Contents( Parameter1 ) )

Also, see the video that includes set up and how to invoke.

https://www.youtube.com/watch?v=7TfV8qTUyfU&t=185s

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn


 

 

 

View solution in original post

1 REPLY 1
Mariusz
Community Champion
Community Champion

Hi @amaleranda 

 

Sure, you can use the parameters as per below.

Create ParameterCreate Parameter

Adjust your M code as below.

source = Json.Document( Web.Contents( Parameter1 ) )

Also, see the video that includes set up and how to invoke.

https://www.youtube.com/watch?v=7TfV8qTUyfU&t=185s

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn


 

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.