Earn recognition and rewards for your Microsoft Fabric Community contributions and become the hero our community deserves.
Learn moreSee when key Fabric features will launch and what’s already live, all in one place and always up to date. Explore the new Fabric roadmap
Hello Power BI Community,
I have a web application where multiple Power BI reports are embedded for users across different scopes. Currently, users interact with these reports using various slicers.
I want to integrate an AI-based chatbot to enhance the user experience by allowing them to apply filters through chat commands instead of manually selecting slicers.
What would be possible and the best approach to achieve this? Are there any existing APIs, frameworks, or best practices for dynamically controlling Power BI slicers using chatbot interactions?
Any guidance or suggestions would be greatly appreciated!
Thanks in advance!
Solved! Go to Solution.
Hi @Mestu_Paul , Thank you for reaching out to the Microsoft Community Forum.
Best way to enable chatbot-based filtering for embedded Power BI reports is to combine natural language understanding with the Power BI JavaScript API. Use an NLP framework like Dialogflow, Rasa or Azure OpenAI to interpret user commands and extract structured filter parameters. Once extracted, match these parameters to slicers in the embedded report using the getSlicers() method.
If matching slicers exist, build a new slicer state and apply it using setSlicerState(). This directly updates report visuals without user interaction. If slicers aren’t available for a requested field, use updateFilters() to apply visual or page-level filters instead. This ensures user commands still take effect, even when slicers aren’t configured for every field.
Note that filters applied this way affect visuals only, they do not enforce Row-Level Security. RLS must be handled in the dataset configuration. For scalability, maintain a mapping of report IDs to available slicers and ensure your embedding setup enforces RLS where needed.
If this helped solve the issue, please consider marking it “Accept as Solution” and giving a ‘Kudos’ so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Thank you.
Hi @Mestu_Paul , Thank you for reaching out to the Microsoft Community Forum.
Best way to enable chatbot-based filtering for embedded Power BI reports is to combine natural language understanding with the Power BI JavaScript API. Use an NLP framework like Dialogflow, Rasa or Azure OpenAI to interpret user commands and extract structured filter parameters. Once extracted, match these parameters to slicers in the embedded report using the getSlicers() method.
If matching slicers exist, build a new slicer state and apply it using setSlicerState(). This directly updates report visuals without user interaction. If slicers aren’t available for a requested field, use updateFilters() to apply visual or page-level filters instead. This ensures user commands still take effect, even when slicers aren’t configured for every field.
Note that filters applied this way affect visuals only, they do not enforce Row-Level Security. RLS must be handled in the dataset configuration. For scalability, maintain a mapping of report IDs to available slicers and ensure your embedding setup enforces RLS where needed.
If this helped solve the issue, please consider marking it “Accept as Solution” and giving a ‘Kudos’ so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Thank you.
@v-hashadapu Thanks for your details information.
I tried same as you describe. But I also tried with visual creation, page navigation and textual response on a specific visual's data. And successfully I can make a prototype. And everything is possible for embedded api and LLM api
Hi @Mestu_Paul ,
I wanted to follow up and see if you’ve had a chance to review the information provided here.
If any of the responses helped solve your issue, please consider marking it "Accept as Solution" and giving it a 'Kudos' to help others easily find it.
Let me know if you have any further questions!
Hi @Mestu_Paul , Thank you for reaching out to the Microsoft Community Forum.
Please let us know if your issue is solved. If it is, consider sharing the insights or marking the answers that helped 'Accept as Solution', so others with similar queries can find them easily. If not, please share the details.
Thank you.
Thanks @tharunkumarRTK for your response, hopefully it can be helpfull to me. I also thought one idea with power bi embedded api. Specifically slicer getState and setState method. Convert user text to slicer state then set it to the proper slicer state. But still waiting for any better idea from the greate community
Interesting!
As per the below thread, Power BI Copilot is not supported in embed report scenario
In my view, Microsoft Copilot studio (aka Power Virtual agents) might be right choice. You can deploy this to your web application.
To control a slicers of a report which is embedded ina web application you can use this API
Need a Power BI Consultation? Hire me on Upwork
Connect on LinkedIn
|
User | Count |
---|---|
85 | |
70 | |
65 | |
58 | |
57 |
User | Count |
---|---|
46 | |
36 | |
33 | |
30 | |
28 |