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
Dz6kb4
Frequent Visitor

Dynamic sets of images based on filter

Hi all.

 

i couldn't find an exact answer to my question on the search. I'm basically looking for a way to dynamically display a range of images depending on a filter selected.

 

for example, if I have a report on foods I might have a food filter including meat, fish, veg.

 

when I select meat I want to show an image of chicken, pork and beef with a total calorie per 100g under each one.

if I then select fish I want to dynamically remove the meat images and replace with tuna and salmon images and their associated calorie counts.

 

is this at all possible?

many thanks.

2 ACCEPTED SOLUTIONS
Vvelarde
Community Champion
Community Champion

Hi @Dz6kb4,

Yes. Based on Vvelarde's sample data, you would need to have one of the amount eaten records in table for each month of the year as shown in the following screenshot.
4.PNG

However, to better manage your tables, I would recommend you separate the Food table to two tables,  then create relationship between the two tables using type field. For more details, please review the modified PBIX file.
1.PNG2.PNG

 


Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
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

17 REPLIES 17
aditya_fractal
Advocate II
Advocate II

Hi all,

 

The solution proposed is working perfectly. However, just wanted to know if there is any way to avoid the ImageURL. For example: what can we do if the images are not available on the internet.

 

Thank you!

One of the solutions I found is to convert the image into Base64, store it in my model & use it from there.

If anyone comes across a better way of doing this, I would request you to share it with all of use here.

 

Thank you!

smsantos31
New Member

Hello!

I followed the instructions but I cannot display the image, and when I tried downloading the pbix file with the DEMO, the same happens. Could it be a restriction of the local network?

Thanks!

 Check my screenshot here: SCREENSHOT, I couldn't upload the image. 

 

SS

Hi,

 

The same thing has happened to me with regards to the images not being displayed correctly. Did you manage to resolve this? I have tried uploading the URLs in an Excel data table and also typed manually directly into PBI - neither have worked.

 

Would be grateful for a response.

 

Aki

lu_vynn
Regular Visitor

Hi,

Have you put your URL data as Image URL? In the Modeling tab:

 

smsantos31
New Member

Hello!

I followed the instructions but I cannot display the image, and when I tried downloading the pbix file with the DEMO, the same happens. Could it be a restriction of the local network?

Thanks!

 Check my screenshot here: SCREENSHOT, I couldn't upload the image. 

 

SS

Hi,

 

The same thing has happened to me with the image not being displayed. I've tried uploading an Excel sheet with URLs and also typed the data directly in Power BI.

 

Did you find a solution?

Vvelarde
Community Champion
Community Champion

Anonymous
Not applicable

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

@Anonymous You can convert any image you want to use inside POWER BI into base64 format using any of the websites available & use the generated base64 string.

 

Hope it helps!

Wow, brilliant, had now idea you could do that, thanks alot.

 

I forgot to add an extra level of complexity however - if I replaced calories with amount eaten and that amount eaten changes depending on the month, would I be able to use this technique still?  I.e if I select Jan and meat - have all the meat images and just the jan amount eatens shown?

Many thanks

Dz6kb4
Frequent Visitor

@Vvelarde if you can help pls? 🙂

Vvelarde
Community Champion
Community Champion

@Dz6kb4

 

Yes, still work. Just add a slicer with the months.

 

 




Lima - Peru

@Vvelarde thanks again.  But presumably I will need to have one of the records in your table for each month of the year if I want to change the values and images  by month?  Just wondering if there is a better way to do this?

 

Many thanks.

Hi @Dz6kb4,

Yes. Based on Vvelarde's sample data, you would need to have one of the amount eaten records in table for each month of the year as shown in the following screenshot.
4.PNG

However, to better manage your tables, I would recommend you separate the Food table to two tables,  then create relationship between the two tables using type field. For more details, please review the modified PBIX file.
1.PNG2.PNG

 


Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Excellent, thanks very much both

Hi @Dz6kb4,

You can accept multiple helpful replies as answer, this way, other community members would easily find the answer.

Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.