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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Passing slicer value as a parameter to API

Hi All, We are trying to call an API and get some data into Power BI. We will be using the "Web" option from Get Data and this API will accept one parameter, which is productID. The way this should work is users will select a ProductID from a slicer and then this "selected" value should be passed dynamically to the API end point(URL).

 

My question is how can I pass the selected value from the slicer to the URL.

 

I am thinking we can set a parameter in the Power Query and some how pass the selected value to the paramter and then the underlying API url uses this parameter value.

 

Something on these lines:

= Json.Document(Web.Contents("https://openlibrary.org/api/books?bibkeys=ISBN:" & parmSelectedISBN & "&format=json"))

 

But I really don't know how to pass the user selected slicer value to this parameter.

 

Any help or guidance on this use case is very much appreciated.

 

Thanks,

Aman

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Not possible.  Dynamic M Query parameters only work with Direct Query data sources.

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

Not possible.  Dynamic M Query parameters only work with Direct Query data sources.

Anonymous
Not applicable

Thank you for your response @lbendlin. Too bad we can't handle this type of use case in Power BI.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.