Forum Discussion
Is it possible to run code on PowerBI Desktop to get visual level metadata?
- 1 year ago
yazdanb As I recall, SQL BI had a DAX script that returned all of the filters on a visual that I think you could implement as a tooltip. Displaying filter context in Power BI Tooltips - SQLBI
- 1 year ago
Hi yazdanb,
Thank you for reaching out to the Microsoft fabric community forum. Thank you Greg_Deckler, for your inputs on this issue.
After reviewing the details you provided, I have identified few workarounds that may help resolve the issue. Please follow these steps:
Limitations of Running Code Directly in Power BI Desktop: Power BI Desktop itself does not provide a built-in way to execute custom Python or JavaScript code directly within the application to extract visual-level metadata. Python scripts in Power BI can process data but do not have access to visual metadata. JavaScript is mainly for embedded analytics and does not work inside Power BI Desktop.
Using Power BI Performance Analyzer to Capture Queries (Manual Approach). The Power BI Performance Analyzer can track how data is being queried in Power BI Desktop, including filters applied. Open Power BI Desktop. Go to View → Performance Analyzer. Click Start Recording, then interact with visuals. Capture DAX Queries, which contain filter conditions. Extract and analyze the DAX code for filtering information.
Use Performance Analyzer to examine report element performance in Power BI Desktop - Power BI | Microsoft Learn
I hope this could resolve your issue, if you need any further assistance, feel free to reach out. If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you for using Microsoft Community Forum.
Hi yazdanb,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
Hi yazdanb,
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.
Thank you.