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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Bobfather
Frequent Visitor

attribute slicer based on multiple columns

I have a report with 3 columns of attributes that I would like to combine into one multi-selectable chiclet-style slicer, since they are all somewhat similar ways to filter the data.  The first has three values, the other two are Yes/No fields.  Both of the Yes/No fields are such that there would never be a reason to focus on the "No" values, only the "Yes" ones.  Here is an example similar to what my data looks like.

image.png

 

Right now, I have 3 chiclet slicers.  If using my example data, the first has "Job" and has three chiclets for "Sales", "Finance", and "Operations".  The other two each have two chiclets for "Yes" and "No".  As I mentioned, there isn't even a need to have the "No" options, and having to use 3 chiclet slicers is cluttering up my report (This is a really large dataset with several other attributes to filter down as well).

 

I want to have one slicer where the user can select multiple options.  What I envision would be a slicer titled "Empl Type", with buttons for "Sales", "Finance", "Operations", "Day Shift", and "Salaried".  I've asked around amongst the other engineers I work with, and no one's figured out how to make this work.

 

If there isn't a way to do so, does anyone have an idea for at least removing the "No" options from the two "Yes/No" slicers?  I could then set up the report with the three slicers so that they sort of look like just one.

1 ACCEPTED SOLUTION

Couldn't figure out exactly how to do it like I thought I wanted, but the end result works great!

 

I left as three separate columns, with a single character designating the type. I set the two "Yes/No" columns from my query to either have the value, or be null. Then, I created three new tables with the short characters used in my main data table, along with "prettified" names for use in the slicers.  I set the relationships to crossfilter both ways, and created three slicers, but grouped them together so they looked like they belonged together.  Creating the extra tables eliminated buttons showing for both "Yes" and "No", and now it will either filter it to the equivalent of the "Yes" answers, or not filter that column at all.

Capture.PNG

View solution in original post

3 REPLIES 3
Eric_Zhang
Employee
Employee

@Bobfather

How about creating a new column and filter against this column?

Column = IF('Table'[Day Shift]="Yes"&&'Table'[Salaried]="Yes",'Table'[Job]&"--"&"Day shift"&"--"&"Salaried","Other")

Capture.PNG

Couldn't figure out exactly how to do it like I thought I wanted, but the end result works great!

 

I left as three separate columns, with a single character designating the type. I set the two "Yes/No" columns from my query to either have the value, or be null. Then, I created three new tables with the short characters used in my main data table, along with "prettified" names for use in the slicers.  I set the relationships to crossfilter both ways, and created three slicers, but grouped them together so they looked like they belonged together.  Creating the extra tables eliminated buttons showing for both "Yes" and "No", and now it will either filter it to the equivalent of the "Yes" answers, or not filter that column at all.

Capture.PNG

I'm not sure I know how I'd set up the filter? I saw a couple other topics mentioning creating a separate "slicer table" using "CONTAINS" formulas, but haven't fully gotten my head around how to set that up. It seems like if I just added the column you listed, I'd end up with 12 possible combinations.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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