cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Need to create a slicer that filters on a column sometimes containing multiple values

Hi all,

 

First, I am using PowerPivot in Excel 2016, I am not sure of feature crossover between PP and Power BI but am hoping someone here can provide guidance.

 

Essentially, I have a Power Pivot table structured in the following way:

 

NameLocation
Name1, Name2a
Name 1b
Name 2c
Name2d
Name1, Name2e

 

Which is to say that some locations can have both names at them. I want to be able to filter the names by location. However, if I add Name as a slicer, I get a slicer menu that looks like this:

 

Name1
Name2
Name1,Name2

 

Theoretically, if I want to isolate all locations with name1, even if they also have name2, I just need to select Name1 and Name1,Name2 from the slicer menu. However, this is confusing my users because there are about 20 unique names they want to filter on, and tons of combinations of those names. What I really need is a slicer menu that looks like this:

 

Name1
Name2

 

And when they select Name1, all the locations including Name1 and Name1,Name2 are filtered on. I hope that this explanation makes sense, as well as the use case for this filter. I'm at a dead end and any help would be very much appreciated.

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi @Anonymous ,

>>Theoretically, if I want to isolate all locations with name1, even if they also have name2, I just need to select Name1 and Name1,Name2 from the slicer menu.

Unfortunately, slicer and filter not support this.
You can consider to create a table with items, then you can write a measure to compare selected value and current row content and use it on visual level filter.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

Hi @Anonymous ,

>>Theoretically, if I want to isolate all locations with name1, even if they also have name2, I just need to select Name1 and Name1,Name2 from the slicer menu.

Unfortunately, slicer and filter not support this.
You can consider to create a table with items, then you can write a measure to compare selected value and current row content and use it on visual level filter.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Thanks so much for your reply. This is kind of where I had wound up - I was able to create a visual-level filter by making a separate table with the values I wanted and using DAX to compare the selected value from that table with the pivot table, then hiding non-matches. I suppose the solution here is just clearly explaining to the users how to use the slicer menu.

 

Thanks again!

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Top Solution Authors