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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
JJJ109
New Member

Slicer to check if value exists in any column, then filter to those rows

Hi everyone,

 

Reasonably new to Power BI, so greatly appreciate any assistance with my current challenge.

 

I have a table of data, showing the sports an individual plays. When an individual plays more than one sport, they are spread across multiple columns, as shown in the 'SampleValues' table below.

 

I am hoping to create a single slicer which allows a report user to select one sport, filtering the SampleValues table to anyone playing that sport. For example, if tennis is selected in the slicer, it would return rows 1, 6, and 7, and 9.

 

I have tried using a concatenated column (with COMBINEVALUES) and a new table for slicer values ('SlicerValues', below); however, as the values in SlicerValues (e.g. Tennis) don't match exactly with concatenated values (e.g. Tennis;; or Basketball;Tennis;), it does not properly filter.

 

I have also tried setting up relationships between the SlicerValues table and Sport1,Sport2,Sport3 columns in SampleValues, but Power BI seems to restrict to only one relationship per table pair.

 

'SlicerValues' Table:

Sport

Baseball
Basketball
Cricket
Football
Soccer
Tennis

 

'SampleValues' Table:

NameAgeSport 1Sport 2Sport 3Sport Summary
1aTennis  Tennis;;
2bSoccerFootball Soccer;Football;
3c   ;;
4dBasketballCricket Basketball;Cricket;
5eFootball  Football;;
6fFootballCricketTennisFootball;Cricket;Tennis
7gTennis  Tennis;;
8h   ;;
9iBasketballTennis Basketball;Tennis;

Many thanks in advance for any suggestions or advice you many have.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@JJJ109 , One way is to have active and inactive join, both of them with slicer assume sport 1 is active and sport 2 is inactive

Create a measure to count

M1=  count(SampleValues[Name]) + calculate( count(SampleValues[Name]), userelationship(SampleValues[Sport 2], SlicerValues[Sport]) )

 

 

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

 

or refer

Power BI- Text Part slicer to filter/search text - https://youtu.be/MKKWeOqFG4c
https://medium.com/@amitchandak/power-bi-search-text-parts-in-text-ad2f9783ffa2

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
ProjectKM
Frequent Visitor

If you don't need to see Sports 1, Sports 2, and Sports 3,
Then unpivot the columns and connect them to Sport

 

Here's a sample
 
'Slicer Value' table
ProjectKM_0-1687147767197.png
 
'Sample Values' table
ProjectKM_2-1687147810039.png

 

and table visual

ProjectKM_3-1687147866926.pngProjectKM_4-1687147875972.png

 

I hope it helps

amitchandak
Super User
Super User

@JJJ109 , One way is to have active and inactive join, both of them with slicer assume sport 1 is active and sport 2 is inactive

Create a measure to count

M1=  count(SampleValues[Name]) + calculate( count(SampleValues[Name]), userelationship(SampleValues[Sport 2], SlicerValues[Sport]) )

 

 

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

 

or refer

Power BI- Text Part slicer to filter/search text - https://youtu.be/MKKWeOqFG4c
https://medium.com/@amitchandak/power-bi-search-text-parts-in-text-ad2f9783ffa2

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors