Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
PrachiJain_2025
Advocate V
Advocate V

How can I export the DAX query generated by a specific visual using the Performance Analyzer in Powe

How can I export the DAX query generated by a specific visual using the Performance Analyzer in Power BI Desktop? dymamically uisng spark code

2 ACCEPTED SOLUTIONS
V-yubandi-msft
Community Support
Community Support

Hi @PrachiJain_2025 ,

Thank you for engaging with the Microsoft Fabric Communit. 

1. Open Power BI Desktop and go to the View tab, then select Performance Analyzer.

2. Start recording, refresh or interact with the visual, and once it loads, click Copy Query under the visual.

3. Paste the DAX query into a text editor for further analysis.
Use Performance Analyzer to examine report element performance in Power BI Desktop - Power BI | Micr...

FYI:

Vyubandimsft_0-1744364718189.png

 

2, Currently, Power BI Desktop does not support programmatic access to DAX queries from visuals using tools like Spark, Python, or any API.

Reasons:

  1. The Performance Analyzer is a manual feature in the Power BI Desktop UI.
  2. Microsoft has not provided a public API or SDK to dynamically extract these queries from visuals.
  3. Tools like Spark or other scripting environments cannot directly access visuals or the semantic model in Power BI Desktop.

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

Currently, Semantic Link  allows programmatic access to semantic model metadata and measure evaluation using Spark (Python), but it does not expose the actual DAX query generated by a specific visual in a Power BI report (like Performance Analyzer does).

Semantic link and Power BI connectivity - Microsoft Fabric | Microsoft Learn

 

If you're looking to analyse or automate DAX queries at the model level, consider these options:

  1. Connect to your Power BI or Fabric semantic model using the XMLA endpoint for programmatic access.
  2. Use tools like DAX Studio, Tabular Editor, or SQL Server Management Studio (SSMS) to explore, run, and monitor DAX queries directly against the dataset.

Thanks..

View solution in original post

7 REPLIES 7
PrachiJain_2025
Advocate V
Advocate V

Thank you, will wait for dynamic option using Semantic Link

V-yubandi-msft
Community Support
Community Support

Hi @PrachiJain_2025 ,

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

V-yubandi-msft
Community Support
Community Support

Hi @PrachiJain_2025 ,

Has your issue been resolved, or do you require any further information? Your feedback is valuable to us. If the solution was effective, please mark it as 'Accepted Solution' to assist other community members experiencing the same issue.

V-yubandi-msft
Community Support
Community Support

Hi @PrachiJain_2025 ,

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution we provided for your issue worked for you  or let us know if you need any further assistance?

Your feedback is important to us, Looking forward to your response. 

PrachiJain_2025
Advocate V
Advocate V

Does there any  feature available using semantic library?

Currently, Semantic Link  allows programmatic access to semantic model metadata and measure evaluation using Spark (Python), but it does not expose the actual DAX query generated by a specific visual in a Power BI report (like Performance Analyzer does).

Semantic link and Power BI connectivity - Microsoft Fabric | Microsoft Learn

 

If you're looking to analyse or automate DAX queries at the model level, consider these options:

  1. Connect to your Power BI or Fabric semantic model using the XMLA endpoint for programmatic access.
  2. Use tools like DAX Studio, Tabular Editor, or SQL Server Management Studio (SSMS) to explore, run, and monitor DAX queries directly against the dataset.

Thanks..

V-yubandi-msft
Community Support
Community Support

Hi @PrachiJain_2025 ,

Thank you for engaging with the Microsoft Fabric Communit. 

1. Open Power BI Desktop and go to the View tab, then select Performance Analyzer.

2. Start recording, refresh or interact with the visual, and once it loads, click Copy Query under the visual.

3. Paste the DAX query into a text editor for further analysis.
Use Performance Analyzer to examine report element performance in Power BI Desktop - Power BI | Micr...

FYI:

Vyubandimsft_0-1744364718189.png

 

2, Currently, Power BI Desktop does not support programmatic access to DAX queries from visuals using tools like Spark, Python, or any API.

Reasons:

  1. The Performance Analyzer is a manual feature in the Power BI Desktop UI.
  2. Microsoft has not provided a public API or SDK to dynamically extract these queries from visuals.
  3. Tools like Spark or other scripting environments cannot directly access visuals or the semantic model in Power BI Desktop.

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.