Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

New Member

Use a slicer to filter from a list in a cell

Hi, all,

I'm a librarian trying to get some insight from our programming data. The way our staff inputs our programming data, it can have multiple age groups in one cell (Elementary, Middle School, High School, etc.)


What I would like to do is have a slicer that, if they select Elementary, it pulls all the attendance data (from the measure Attendance Total which adds the columns AttendanceChildren, AttendanceTeens, and AttendanceAdults) from all the rows that have Elementary anywhere in the Age Group column. So it could be Elementary all by itself (which I can do), or Elementary High School, or Elementary Adults. I have a table with my age groups, so I can get the slicer to do what I want, and I've linked the age group table with the programming group table, but it is still pulling ONLY programs that have Elementary.

I've tried adding columns in my data table that have Yes if Elementary is found anywhere in the cell, but I'm struggling with how to get it to show up. I'd appreciate any suggestions, with the caveat that I haven't had a lot of formal Power BI training and am basically learning through a combination of experimentation and looking at other folks' code. Thanks!

Community Support
Community Support

Hi @jdg_librarian 


Not sure what your expected result should be like. If you want to show data that has the group selected in the slicer, you can create a measure like below and use it as a filter on the visual. When set it to show items when the value is 1, it only shows items whose AgeGroup contains the selected group. 

Measure = IF(CONTAINSSTRING(SELECTEDVALUE('Table'[AgeGroup]),SELECTEDVALUE('Age Groups'[Group])),1,0)


I have attached a sample file at bottom. Let me know if you have any questions. 


Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Helpful resources

PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors