Forum Discussion
Pass parameters dynamically from Power BI to REST API
Hi,
I have a REST API that takes a Product name as a parameter to retrieve a whole set of measures required by my dashboard.
I want to be able to allow end users to select a specific Product from a drop down/slicer and pass that Product name to my REST API and refresh the dashboard for the selection made.
I don't want to load all the data first and then allow user to select the Product name since the fact tables are extremely huge and would impact performance. Is there any way to dynamically pass the values to the REST API as a parameter(at run time)?
Any ideas would assist please?
Thanks
Hi Anonymous
You can pass the parameters like in the example below, however, you will be reloading the model every time you do it.
https://www.youtube.com/watch?v=7TfV8qTUyfU
Currently, you can not use slicers to do it as slicers work with a model that has been loaded and you are trying to pass the parameters before load
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
5 Replies
- Greg_DecklerCommunity Champion
You could use Query Parameters.
- AnonymousNot applicable
Hi Greg_Deckler , I think the Query parameters will only works at Power BI Desktop Level not the Report Level in Power BI service (Online).
I want to pass parameter through the Power BI embedded URL but the report dataset need to have complete data in order to filter but It will impact the performance as I have got huge amount of data.
Regards,
- MariuszCommunity Champion
Hi Anonymous
You can pass the parameters like in the example below, however, you will be reloading the model every time you do it.
https://www.youtube.com/watch?v=7TfV8qTUyfU
Currently, you can not use slicers to do it as slicers work with a model that has been loaded and you are trying to pass the parameters before load
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.- AnonymousNot applicable
Hi Mariusz , I think the Query parameters will only works at Power BI Desktop Level not the Report Level in Power BI service (Online).
I want to pass parameter through the Power BI embedded URL by appending filter= table/field name but the report dataset need to have complete data in order to filter but It will impact the performance as I have got huge amount of data.
Thanks
- AnonymousNot applicable
Hi Mariusz , You are right, Thanks for your confirmation - Crrently it is not possible to pass the parameter through the Embedded / Report URL or Slicer to the model before loading the data.
Thank you,