Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I want to add a background image to a scatter plot with some arrows and the only way I could think of doing it in python. However, I am having an issue with it. My code runs fine on Jupyter notebook and on Power BI Desktop, but does not work when published to Power BI service. Please see the details down below.
Sample Python Script down below (only for showing image with no scatter plot):
Hi, I am also encounterning problem of importing images, but from local files. How did you import the local images to power bi with python script?
Hi @Anonymous ,
For your description, you can refer to similar solutions:
How do I read image data from a URL in Python? - Stack Overflow
In addition, I think it is also a good way to obtain images of web pages in power query. Refer to the content of this blog:
Get Images from Web Page Into the Power BI Report Using Power Query - RADACAD
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Henry,
Thank you for your reply. Unfortunately, none of the methods suggested worked. One of our user request was to build some traffic flow analysis with image as a background, which should be able to dynamically change when selecting different location on the slicers. I am unable to find any built-in visuals on Power BI which can do this, thus I had to use Python to build a custom visual from matplotlib.
Best Regards,
lunastra
Hi amitchandak,
thank you for the quick reply. This is a web image url that I can also access through my web browser.