Forum Discussion
How to Enable Dynamic Ticker Filtering for API Data in Power BI?
Hi Power BI Community,
I'm working on a Power BI report that fetches data from several APIs provided by Financial Modeling Prep (e.g., Daily Stock Prices, Price Targets, Upgrades & Downgrades). I want to provide end-users the ability to filter the data by ticker symbols dynamically, but I'm encountering some challenges.
Here's what I have done so far:
1. API Data Import: Successfully imported data from the APIs in Import Mode using Power BI Desktop.
2. Parameter Creation: Created a parameter named SelectedTicker in Power Query Editor.
3. Data Fetching: Modified the API M queries to use this parameter to fetch data for the selected ticker.
4. Slicer Setup: Added a slicer to the report using a table of ticker symbols.
Issues:
1. Dynamic Updates: The SelectedTicker parameter in Power Query does not update dynamically based on the slicer selection made by the user.
2. Parameter Binding: Struggling with how to bind the slicer selection to the parameter so that the API calls can reflect the user-selected ticker.
My Question:
1. How can I dynamically update the API calls in Power BI based on the ticker symbol selected by the user in a slicer?
2. Is there a way to make the parameter update dynamically based on slicer selection?
3. What are the best practices for setting up such dynamic filtering for API data in Power BI?
Example:
For instance, if a user selects "AAPL" from the slicer, the report should fetch and display the latest data for AAPL from the API.
Any insights, examples, or step-by-step guidance on how to achieve this would be greatly appreciated!
Thanks in advance!
1 Reply
- AnonymousNot applicable
Hi anshikak1 ,
Using Dynamic M Query Parameters it is possible to pass values from the slicer to M parameters. However, according to the documentation, these tables must be DirectQuery tables.
Dynamic M query parameters in Power BI Desktop - Prerequisites
From the description, it appears that these tables use Import mode, so dynamic M query parameters cannot be used. Please consider submitting this idea here to help PowerBI do better.
Welcome to Microsoft Fabric Ideas
Some related discussions:
can-i-build-a-power-bi-directquery-dataset-on-top-of-a-rest-api
Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group