Forum Discussion
Power BI reports data connect with REST API and reload data on Refresh dashboard.
Thanks for your reply but i have a requirement to show the data from API based on slicer selection in the report.
so can we use the Selected value from the Slicer in the Advanced Editor/Power Query Editor?
No you can't. What we recommend is to get all the data and then filter it with slicer.
Regards,
- Anonymous6 years agoNot applicable
But Thats the recommendation but is there any work around to get the data from API using slicer value?
because I am wondering that there is a option for direct query where we can pass the slicer value using R.
There should be some workaround where we can pass the slicer value to the API. if anyone know how to crack this pls comment OR lets solve this togther.
- ibarrau6 years agoSuper User
You can't make an http request from DAX once the model is created after you Close & Apply. That is why you have to take the data before doing that with Edit queries. There is no way to call an API with a slicer visualization filter.
Regards,
- MikeAinOz6 years agoHelper V
Hi Jaswinder, the way I have solved this problem has been to use a parameter and pass that to the PowerQuery. I realise that this is a less than perfect solution. To break the problem down into it's components, you have the slicer but no way to pass the slicer selected value from DAX, the presentation layer, to PowerQuery, the data layer. Parameters are also available in the model as what-if parameters, which is closer to what you need, but then they are not available to Power Query. At least I can't work out how to do that. On the positive side it is possible to do what you want in Excel Power Query by accessing the worksheet from PowerQuery. Another way might be to put the slicer on a visual that can update a stored value outside of the PowerBI system and then retrieve that value using Power Query