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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Issue with Simple image and multiple selection

Hi, 

 

I'm building a dashboard that shows some information about countries that are chosen with a slicer. One of the visualizations I use is simple image, that takes an Image URL of the flag of the country I am selecting. This works perfectly when I'm only choosing one country, but when I choose more than one, the flag displayed corresponds to the first country selected. 

 

When I select more than one country, I'd like to show a default flag, or, if it is possible, no flag at all. 

 

Is this possible with Simple Image visualization? If it is not, is there any alternative visualization to use?

2 ACCEPTED SOLUTIONS
ibarrau
Super User
Super User

Hi, I'm not quite sure about the visualizations that render pictures. You can try creating a measure with selectedvalue functions like this:

URL measure = SELECTEDVALUE( Table[URLColumn], "DefaultURLText" )

That way if you click more than one you can just specify the value for that case.

Hope it helps, 


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

View solution in original post

Anonymous
Not applicable

Hi,

Finally I came up with a solution. Simple Image doesn't allow measures, but Image by Cloudscope (https://appsource.microsoft.com/en-us/product/power-bi-visuals/WA200001985?tab=Overview) does. Thus, we can use a measure like the one proposed by @ibarrau :

 

 

flag_to_show=SELECTEDVALUE('Table[Column_with_url_to_image]',"default_url")

 

 Table[Column_with_url_to_image] is the column where we store the URL to the flag, and default_url is the image we want to show when more than one item is selected.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi,

Finally I came up with a solution. Simple Image doesn't allow measures, but Image by Cloudscope (https://appsource.microsoft.com/en-us/product/power-bi-visuals/WA200001985?tab=Overview) does. Thus, we can use a measure like the one proposed by @ibarrau :

 

 

flag_to_show=SELECTEDVALUE('Table[Column_with_url_to_image]',"default_url")

 

 Table[Column_with_url_to_image] is the column where we store the URL to the flag, and default_url is the image we want to show when more than one item is selected.

ibarrau
Super User
Super User

Hi, I'm not quite sure about the visualizations that render pictures. You can try creating a measure with selectedvalue functions like this:

URL measure = SELECTEDVALUE( Table[URLColumn], "DefaultURLText" )

That way if you click more than one you can just specify the value for that case.

Hope it helps, 


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

Olá, resolvi cirando essa solução. ROW está servindo com suporte para retornar sempre uma imagem conforme o filtro e regra...

Paulo20202020_0-1653845827766.png

 

Anonymous
Not applicable

Hi @ibarrau , before opening this thread I tried using a measure, but unfortunately Simple Image doesn't allow them 😞

Too bad. It sounds like you can try a dirty solution. Consider adding a new row as "1-Global" that will always be first. That way you can use the default image url for that row. Before publishing a report like this it might be a good idea to remove 1-Global from the countries slicer with a visual level filter. 

Hope this idea helps,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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