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

OData Feed Parameters for Stored Procedure

I would like to be able to run a SQL stored procedure through OData feed data source using a dynamic parameter. For example, I would like to enter a customer number that power BI subsequently refreshes and spits out my stored procedure that has already been set up. 

 

I have been able to do this in excel using this language in the advanced editor before the API source: 

let
VarCustNum = Number.ToText( Excel.CurrentWorkbook(){[Name="VarCustNum"]}[Content]{0}[Column1])

 

Is it possible to set up a similar call to the odata feed source using Power BI?

3 REPLIES 3
v-yingjl
Community Support
Community Support

Hi @gordway ,

About using parameters in OData, you can refer this simliar issue:

PBI app cannot load odata.feed with M functions in the URL 

 

Here is the blog which also introduces it:

Troubleshooting Data Refresh Performance Issues With OData Data Sources In Power BI And Excel Using ... 

 

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

Thank you for the response @v-yingjl !

 

Is there a way that I can reference a PBI visual (i.e. a text box, dropdown, etc) from within the call to the API? Meaning I can update the visual with the parameter I am looking for and the call to the API will then be triggered executing the stored procedure with new parameter?

Hi @gordway ,

You can create parameters list in power query to quote it in the query dynamically.

Please refer:

  1. Using parameters 
  2. Use parameters and custom functions to call APIs in Power BI 

 

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

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