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
Mardin
Advocate IV
Advocate IV

Show picture in report based on slicer selection

Hi! Is there a way to show a specific picture in a report based on a slicer selection?

 

Lets say I have a table with a list of company names in the first column and a list of logo links next to them in the second column:

 

Then for example if I choose Microsoft in the slicer it should show a Microsoft logo in the lover right corner of the report page, and if I change the slicer selection to lets say Google or Amazon the logo in the corner should change accordingly. 

 

Is this possible? A custom Viz perhaps?

2 ACCEPTED SOLUTIONS
v-huizhn-msft
Employee
Employee

Hi @robofski,

As @Mardin said, you can store the image URL in resouce table. For example, my sample table is:

Name Picture
Google https://upload.wikimedia.org/wikipedia/commons/thumb/2/2f/Google_2015_logo.svg/1200px-Google_2015_lo...
Bing https://pbs.twimg.com/profile_images/688769847900033024/Zdfx4cj5_400x400.png


Set the picture link as Image URL as follows.

1.PNG

Then create a slicer including the name, table visual including picture column, please see the expected result.

2.PNG3.png
Best Regards,
Angelia

View solution in original post

@Mardinlooks like it's just a regular table visual with the value being the field with the image URL.  Provided it's set to be an image URL then the image will show not the text.  If you size it correctly then you can get it that only the image for the filtered item shows up.  The only thing I don't like about using the table visual is the heading for the 'column' I can't see a way to turn that off.

View solution in original post

7 REPLIES 7
mortie23
New Member

If you do not have the images hosted on a URL and do not have access to a webserver you may find this useful. Particularly if the images are small (or vectors). https://mortimer.xyz/powerbi-dynamic-images/

This involves using the HTML Content vizual from the market place and encoding your images as Base64 or using SVG.

v-huizhn-msft
Employee
Employee

Hi @robofski,

As @Mardin said, you can store the image URL in resouce table. For example, my sample table is:

Name Picture
Google https://upload.wikimedia.org/wikipedia/commons/thumb/2/2f/Google_2015_logo.svg/1200px-Google_2015_lo...
Bing https://pbs.twimg.com/profile_images/688769847900033024/Zdfx4cj5_400x400.png


Set the picture link as Image URL as follows.

1.PNG

Then create a slicer including the name, table visual including picture column, please see the expected result.

2.PNG3.png
Best Regards,
Angelia

Anonymous
Not applicable

What if the image I want to display is a screenshot form my PC, and does not have a URL? How can I link this to the filter?

Hi Angelia,

 

Can you link to the visual you use to display the actual image? 🙂

@Mardinlooks like it's just a regular table visual with the value being the field with the image URL.  Provided it's set to be an image URL then the image will show not the text.  If you size it correctly then you can get it that only the image for the filtered item shows up.  The only thing I don't like about using the table visual is the heading for the 'column' I can't see a way to turn that off.

Thanks! I see your point about the heading still showing. That is a quite unfortunate.

Hopefully there will be a better solution in the future.

But thanks for the tip! 🙂

robofski
Resolver II
Resolver II

There used to be a customer vizual called 'Image Viewer' that would have done just what you want but it seems to have been removed from the store now.  You can do the same thing using a Table or Matrix but it's not a nice.  You just have to remember to set the data category of the field containing the URL to Image URL in the modeling tab.

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.