Forum Discussion
attribute slicer based on multiple columns
- 9 years ago
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.
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")
- Bobfather9 years agoFrequent VisitorI'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.
- Bobfather9 years agoFrequent Visitor
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.