Forum Discussion
Adding slicer for multiple columns in Power BI
Hello Everyone,
I am new to Power BI. I am trying to add a slicer to a table visualization that I had created. What I want to achieve here is, I have a table with three columns as given below. I want the table to be filtered by clicking a slicer. The slicer should contain only EC or BARR.
When the user selects the slicer below is the expectation:
1) User selects EC, the table should only show names with EC as "Yes"
2) User selects BARR, the table should only show names with BARR as "Yes"
3) User selects both EC and BARR, the table should only show names which has both EC and BARR as "Yes"
4) If no option is selected, the table should show all the rows
| Name | EC | BARR |
| Anna | Yes | Yes |
| John | Yes | |
| Mark | Yes | |
| Linana | Yes | Yes |
| Benny | ||
| Benjamin | Yes | |
| Arnaud | Yes | |
| Henry | Yes | |
| Benny | Yes | |
| Milky | Yes |
9 Replies
- DimaMD
Solution Sage
- Dave805533New Member
Hi DimaMD , Nope both are columns.
- DimaMD
Solution Sage
Hi, Dave805533 try it Colum
Filter = IF(AND([EC] = "Yes", [BARR] = "Yes"), "EC and BARR", IF([EC] = "Yes", "EC", IF([BARR] = "Yes", "BARR", "None")))
- Idrissshatila
Super User
Hello Dave805533 ,
yes, you can use field parameters to reach what you're asking for.
refer to this documentation to learm more about field parameters https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-field-parameters
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
- Dave805533New Member
Hi Idrissshatila , Thank you for the response. I tried doing it but, all the rows are listed regardless if there is Yes in the row or not. I want to display only the rows with Yes in it.