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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
jdg_librarian
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!

1 REPLY 1
v-jingzhang
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)

vjingzhang_1-1685420596978.png

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

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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.