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

Slicer to display only applicable values

Hi there,

 

I have two tables 

Country(Country Code, Country Name, Continent Code), a look up table with all the 200+ countries

Building (Country Code, City Code, Building Code, Building Name)

 

The two tables have

  • one to many relationship on the Country Code
  • cross filter direction = both

 

I then added two slicers

slicer A on Country name

slicer B on Building name

 

Apparently, Slicer B will have all the buildings we have globally. I am expecting slicer A to display only the countries we have buildings in. But it shows all the 200+ countries (including the ones that we don't have any buildings in).

 

How to solve this problem?

 

Thank you!

Kevin

3 REPLIES 3
punitkhatri
Helper III
Helper III

punitkhatri_0-1694244331348.png


This seems to work totally fine for me....please make sure that these are configuration of the relationships. If you want the expected output.

punitkhatri_1-1694244406323.png

 

chonchar
Helper V
Helper V

Something like this was just posted by @SWoodring on this post: https://community.fabric.microsoft.com/t5/Desktop/Fix-matrix-filter-once-selected/m-p/3421892#M11360...

 

I don't know if the user's problem was fixed, but here ya go. 

 

To achieve the behavior you desire, where clicking on a salesperson in the "Sales by Salesperson" matrix doesn't override the region filter from the "Sales by Region" matrix, you can use a technique called "Sync Slicers" and "Edit Interactions." Here's how you can set this up:

  1. Sync Slicers:

    a. In Power BI, go to the "View" tab in the "Visualizations" pane.

    b. Click on "Sync slicers."

    c. In the "Sync Slicers" pane, click on "New" to create a slicer.

    d. Choose a slicer type (e.g., a dropdown or list) that represents the regions. Connect it to the "Sales by Region" matrix.

    e. Name your slicer appropriately, e.g., "Region Slicer."

    f. Adjust the slicer's appearance and position on the page as needed.

  2. Edit Interactions:

    a. Go to the "Format" tab in the "Visualizations" pane.

    b. Click on "Edit interactions."

    c. You'll see a set of icons next to each visual on your page. These icons represent the interaction between visuals.

    d. Click on the icon next to the "Sales by Salesperson" matrix.

    e. A menu will appear. Choose "Keep all filters" or "Keep all filters and highlight." This will ensure that when you click on a salesperson, it doesn't override the region filter applied by the "Region Slicer."

    f. Click "Done" to save your changes.

Now, when you click on a region in the "Sales by Region" matrix, it filters the "Sales by Salesperson" matrix, and subsequent clicks on individual salespeople won't affect the region filter.

 

Hope this help,

 

Cam

elac
Frequent Visitor

Hi Cam,

Thank you first for the reply!

 

However, it didn't seem to work for me even I sync-ed the slicer.

 

After-all, i am expecting the country slicer to display only a subset of the all the countries in the first place because the cross filter direction (both) was supposely doing this for me.

 

In addition to solve this problem, I'd also like to understand why it didn't 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.