Forum Discussion
Seeking Help to Use AI-Based Chatbot in Power BI Embedded Report
- 1 year ago
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