Forum Discussion
pkn7
2 years agoFrequent Visitor
Dynamic M Query with REST API
Hi, I am trying to connect to REST API from POwer BI which is working fine. But is there a way to dynamically pass the parameters values in the API call based on user selection. For Eg. I have a pa...
- 2 years ago
You cannot bind a slicer to a query parameter. If you want a user to be able to select a country like you would with a parameter, you must load all the data pertaining to the country values.
danextian
Super User
2 years agoHi pkn7
M affects the data model but it is not the other way around. What you do in the designer stays in the designer thus a slicer selection cannot be passed back to M. The user will have to change the parameter which will trigger the query to reprocess and reload. If you want to use a slicer then all values of paramCountry from the REST API must be loaded to the model.