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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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/
MattAllington
Community Champion
Community Champion

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.
I will not give you bad advice, even if you unknowingly ask for it.

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.
I will not give you bad advice, even if you unknowingly ask for it.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.