Forum Discussion

yazdanb's avatar
yazdanb
Frequent Visitor
1 year ago
Solved

Is it possible to run code on PowerBI Desktop to get visual level metadata?

Hi everyone. I need to get metadata on my visuals in my reports, but not just the surface level stuff - I need visual types, where the data is coming from, and what filters are being applied (basical...
  • v-kpoloju-msft's avatar
    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.