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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Dynamically Filter 2 Columns ( both containing lists) and categorize into a slicer

Hi Everyone, 

I've spent quite some time on this issue and searched the forums/internet and have been unable to find a solution.

I'm trying to create a slicer that looks at 2 columns (containing lists) and categorizes them into groups based on whether or not they contain contain certain values. Does BI have this capability? 

 

The 2 lists below represent the current data. 

rsand_0-1632326693096.png

 

Ideally the slicer would look something like this (please excuse the crude ms paint drawing) 

 

rsand_1-1632326843104.png

Thanks in advance. 

 

R. San 

 

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , if they are not overlapping then you can have new column like

 

New column = Switch( True() ,

(search("a", [ListA],,0) > 0 && search("y", [ListB],,0) > 0 )|| (search("a", [ListB],,0) > 0 && search("y", [ListA],,0) > 0 ),"Group A" ,
(search("c", [ListA],,0) > 0 && search("y", [ListB],,0) > 0 )|| (search("y", [ListB],,0) > 0 && search("y", [ListA],,0) > 0 ),"Group A" ,
// add others
)

 

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
Anonymous
Not applicable

This is a more accurate depiction of the fields. When i ran the code I was only seeing 2 groups in the slicer versus the desired 5. Any troubleshooting assistance would be greatly appreciated. Thanks in advance

rsand_1-1632782236034.png

 

Anonymous
Not applicable

I've added the new column to the the slicer it only shows 2 visible groups, unfortunately this does not seem to be a solution. 

Is it possible to concatenate the two columns and search it for "a" and "y"? If so, how would that code look (it seems fairly complex)? 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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