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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mattkocak
Kudo Kingpin
Kudo Kingpin

How to make an imported image transparent in Power BI?

I'm trying to create a Power BI report where the user is displayed an image based on what they select in the report's table.

For example, if I select the Toyota row in the below image, then I should be presented with a picture of a Toyota. If I select the Honda row, then I should be presented with a picture of a Honda.

tetra_matt_2-1648029951450.png

tetra_matt_3-1648029963412.png

I'm trying to use imported images to accomplish this (Insert > Image), since having hosted or Base64 encoded images have their own set of challenges in my circumstance. The problem is that I haven't been able to find a way to make imported images transparent. Since these images are on top of each other in the report, I will need to make one or the other transparent based on the table selection. For other shapes, or for the images' backgrounds, I can use conditional formatting and a DAX measure such as the following to accomplish this.

 

Toyota Background = IF(SELECTEDVALUE('Table'[model]) = "Toyota", "#FFFFFF", "#FFFFFF00")

 

There is no such conditional formatting ability for the image shape as a whole, though. Does anyone know how one could accomplish this? It doesn't have to be that an image is specifically made transparent as long as it accomplishes my goal above. I would be open to using custom visuals, but I would like to avoid a hosted or Base64 encoded image solution if possible.

Note for future readers: If you are able to use hosted or Base64 encoded images, then the Image Pro by CloudScope custom visual can be used to accomplish the goal above.

4 REPLIES 4
sarthak2312
Regular Visitor

Got any solution for the task? I am in a same boat and trying to figure out how to make it work. Thanks in advance!

Hey, no solution that I know of for natively imported images. But if you are able to use hosted or Base64 encoded images, then the Image Pro by CloudScope custom visual can be used to accomplish the goal above.

PVO3
Impactful Individual
Impactful Individual

I would say stop stacking the images. Just use a measure to make the URL/path dynamic.

For an easy fix you could also try the custom visual ChicletSlicer.

I had mentioned wanting to avoid hosting the image and was hoping to use images imported directly into Power BI. This is why the images are stacked. If I end up needing to host the image, then your suggestion could work.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.