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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

New Member

Is it possible to automate extraction of a power bi report/visualization using a Python Script?

Hello. I was tasked to automate scheduled email reports with Power BI visuals on them. Basically it looks like this:


"Daily Report of Tickets Completed for today.


*insert power bi visual*"


Upon researching, I found out that you can do this with Power Automate. Unfortunately, we don't have license for this service or product. I already have an idea on how to send automated emails using python. I just can't figure out how to automate powerbi visual extraction and slap it on the email report. Is it possible to automate extraction the power bi visual of a report from just a specific sheet and insert it to the email using python script? 

Thanks for the help.



Super User
Super User

You can use any tool or service that can run DAX queries against the dataset. In the case of your visual you can use Performance Analyzer or "Export to Excel with Live connection" (still cracks me up every time I read this) to "borrow"  the DAX query that was used to fetch the data for the visual.

Can you elaborate on that? All I need is the picture or visual itself to be inserted on the email. So I'm thinking that once it is downloaded locally to my computer, a python script can just pull the picture from that directory on my computer and insert it to the email. 

Is it possible to automate extraction/download the power bi visual/picture of a specific sheet on schedule using a python script as well? or is there any other way to automate the download/extraction of the picture? 

The output of the email will be like this.


I'm still new to this so please bear with me and thanks for your patience. 

Exporting the image of a rendered visual is not something you can do programmatically at the moment.  It is possible to do it manually though, by right clicking on the rendered visual.



If this is important to you please consider voting for an existing idea or raising a new one at

Helpful resources

July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.