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
ThePiecesFit
Advocate III
Advocate III

How do I filter to IDs that have at least one Product that matches the slicer selection?

I want to do the following: when a user selects a Product from the slicer, the visual should filter to the IDs that have that product and other products, not just to the rows that match that Product. The visual is supposed to show the popularity of products when the ID has a row that matches the slicer. 

 

I can't make a column that references the SELECTEDVALUE() and compares to the Product column because that's not allowed in a column. I've tried measures without success. 

 

Thanks for your time. 

 

PBIX: https://drive.google.com/file/d/1rcPWz8nWqBwqYAqAoFx5ma25tFDTLfy_/view?usp=sharing

 

Quick view without slicer selection:

ThePiecesFit_0-1714167232115.png

 

Expected result when  "Table" is selected is.

IDProduct
1Pen
1Shoe
1Table
4Pen
4Shoe
4Table
5Pen
5Table

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1714190641699.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

7 REPLIES 7
Ashish_Mathur
Super User
Super User

Hi,

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1714190641699.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thanks! It works. Now I need to take the time to understand why 🙂 

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

You can add a measure to a slicer as a filter. Write a measure 

has records = countrows(yourSlicerTableName)

 

and add it to the slicer as a filter so that the measure result is >0



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

Maybe I'm confused, but it seems like your recommendation would filter the slicer options. But what I'm trying to do is reference the slicer value in another table such that it filters to the IDs that contain at least one matching value to the slicer. 

OK, sorry about that.  Slicers do not cross filter each other by default. Just go to "edit interaction" and turn on cross filtering between the slicers



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

Maybe I'm not explaining myself correctly. When "Table" is selected in the slicer, I would like it to filter this table 

 

ThePiecesFit_0-1714171664278.png

 

To look like this. That's because IDs 1, 4, and 5, all contain at least one instance of "Table." Then when I put this info in a visual it will tell the user that of the IDs that have at least one table, the most popular products are Table (3), Pen (3), and Shoe (2). Did I explain that clearly? 

 

IDProduct
1Pen
1Shoe
1Table
4Pen
4Shoe
4Table
5Pen
5Table

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.