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

Select all slicer with images

Good day all,

 

I have a slicer for selecting countries in Africa. I managed to have it show the corresponding flag of the country when a country is selected but, I want to know how to have it show an image of Africa when the slicer is on select All.

 

Thanks in advance.

1 REPLY 1
123abc
Community Champion
Community Champion

To display an image of Africa when the slicer in Power BI is set to "Select All," you can follow these steps:

  1. Prepare Your Data: Ensure that your data source contains a column that represents the selection of all countries. This column should contain a unique value (e.g., "All") that you can use to identify when "Select All" is chosen.

  2. Create a Measure: You will need to create a measure that specifies what image to show based on the slicer selection. You can use the DAX formula for this measure. For example

ImageToShow = IF(ISFILTERED('YourTable'[Country]), BLANK(), "Path to Africa Image")

 

  1. In this formula, replace 'YourTable' with your actual table name and "Path to Africa Image" with the file path or URL of the image you want to display when "Select All" is chosen.

  2. Add an Image Visual: Add an image visual to your Power BI report. You can find this in the "Visualizations" pane. Drag and drop the "ImageToShow" measure into the "Values" field well of the image visual.

  3. Set the Default Image: In the image visual's formatting options, set the default image to the image of Africa that you want to display when "Select All" is chosen.

  4. Interactions: Configure the interactions between the slicer and the image visual. Make sure that the slicer interaction for "Select All" is set to affect the image visual. To do this, select the slicer, go to the "Format" pane, and choose the appropriate interaction behavior.

Now, when the slicer is set to "Select All," the measure will return the path to the image of Africa, and it will be displayed in the image visual.

Please note that you will need to adjust the paths and table names in the DAX formula and the settings in your specific Power BI report to match your data and image locations.

 

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

 

In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.

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.