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
RockOfRockyTop
Frequent Visitor

Rest API With User Selected Parameters As Data Source

I'm new to Power BI and have no experience developing in neither it nor Power Query. I have a RESTful API that I would like to use as a data source for my dashboards. The methods that are part of this API use query string parameters. How do I go about making calls from Power BI to this API with parameters that can be changed on the fly by the user. For instance, I have multiple methods that expect a start date and end date. I would like for the user to have the ability to make a selection on a Power BI form and that be used in the call to the API. Is what I'm describing something that can be accomplished?

 

1 ACCEPTED SOLUTION
v-yuezhe-msft
Employee
Employee

@RockOfRockyTop,

To add data source parameter in your URL, please check my reply in the following similar threads.

http://community.powerbi.com/t5/Desktop/Dynamic-connection-to-Web-URL/m-p/346607#M155589
https://community.powerbi.com/t5/Integrations-with-Files-and/Parameters-for-JSON-API-data-Maintain-Q...

After create reports in Power BI Desktop, you may also need to create Power BI template file for user to instantiate.

Regards,
Lydia

Community Support Team _ Lydia Zhang
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

7 REPLIES 7
v-yuezhe-msft
Employee
Employee

@RockOfRockyTop,

To add data source parameter in your URL, please check my reply in the following similar threads.

http://community.powerbi.com/t5/Desktop/Dynamic-connection-to-Web-URL/m-p/346607#M155589
https://community.powerbi.com/t5/Integrations-with-Files-and/Parameters-for-JSON-API-data-Maintain-Q...

After create reports in Power BI Desktop, you may also need to create Power BI template file for user to instantiate.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

how about power bi embedded? power bi ambedded show the reports without licence power bi, which is user cannot inject parameter into power bi API.

@v-yuezhe-msft thank you for your response. I'm now pulling data from my API. My follow up question is this, I'm going to have multiple API calls that will use the same Start and End dates. Is there any way to select these dates and all of the queries use them?

@RockOfRockyTop,

Do you have multiple connections for these API calls in PBIX file? If so, these queries can use the startdate parameter and enddate parameter you create.

Regards,
Lydia

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

@v-yuezhe-msft, I will have multiple connections for the API calls. How do I reference the parameters that I created for the first call? Is there an example somewhere that I can reference?

I found how to add global parameters. Thank you for your help.

@RockOfRockyTop  Could you share how did you do it please?

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.

Top Solution Authors
Top Kudoed Authors