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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Filter table using slicer

I am working on a practice report to try and get up to speed with Power BI. I have a table generated from an input file that has information about people.

 

The table has 4 columns, and one of these columns is "Age". The value in this column for any "person" is either their age as an integer, or blank, meaning their age is not included.

 

I need to have a slicer with the options "ageIncluded" and "ageNotIncluded" that filters the table based on whether a persons age is included or not. I know that for this I can make use of checking for blank/not blank values, but how can I created this slicer that will filter the table when an option is selected?

 

Any help is much appreciated. Thanks! 

1 ACCEPTED SOLUTION

@Anonymous

 

You can try the following:

Column = IF(LEN('Table'[Age]) > 0,"AgeIncluded", "AgeNotIncluded")

View solution in original post

4 REPLIES 4
themistoklis
Community Champion
Community Champion

@Anonymous

 

Create a new column and NOT a measure and put the following:

 

Column = IF(ISBLANK('Table'[Age]),"AgeNotIncluded","AgeIncluded")
Then add it as a slicer in the report
Anonymous
Not applicable

Thank you for your reply! This definitely seems like it should work, but for some reason I get only the "AgeIncluded" option in the slicer, and when I click it the table does not get filtered 😞

@Anonymous

 

You can try the following:

Column = IF(LEN('Table'[Age]) > 0,"AgeIncluded", "AgeNotIncluded")
Anonymous
Not applicable

Thank you very much for your help! 🙂

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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