I am currently working on developing a custom visual for Power BI using TypeScript. This visual includes an input field for user prompts and another input field for ChatGPT answers. The main goal is to allow users to ask questions about the data in their reports or any visual in the report, and receive relevant answers. Here's a sneak peek at the current stage of the visual:
https://i.sstatic.net/yr5Bv.png
Behind the scenes, the user prompt is sent to Azure-OpenAI service and processed by the ChatGPT deployment to generate a response. However, I'm looking to enhance this functionality by also incorporating the report's data. I came across a video showcasing something similar with Power Automate visual, you can watch it here: https://youtu.be/q1XszZrZ3es
https://i.sstatic.net/ZHKxo.png
In the video, they successfully pass the report's data through the Power Automate visual into the user prompt for combined analysis with the data question. Inspired by this, I've managed to achieve a similar outcome by structuring the visual's data in JSON format along with the prompt. It works well, but now the question arises - is it feasible to access the report's data within the custom visual using TypeScript without embedding the dataset directly?
I've attempted to utilize the PowerBI Client library within my custom visual, but it seems that this only works with PowerBI Embedded, causing the visual to malfunction:
This article suggests that it may not be possible to fetch data from other visuals at the page or report scope level using a custom visual:
Any thoughts or suggestions on how to overcome this limitation?