This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi all,
When using the slicer filter (displayed as drop-down), I would like it to use an AND function when selected multiple items.
Basically, I want to be able to filter patients based on the comorbidities they have. So when I select 2 or more items in the comorbidity drop down list, I want the report to show the characteristics of the patients that have both/all comorbidities, and not only one of them (OR function; as it works now). Is there any way to do this?
Thanks!
Hi @im_92 ,
The default behaviour of the slicer in Power BI is that it shows the result of OR when you select multiple items. If you want to having AND condition using a slicer in Power BI you should use measure to control it.
Here is a good article for your reference: https://radacad.com/slicer-with-and-condition-in-power-bi and if you want the exact formula, please show your sample data.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
@im_92 , Creat a measure like
measure =
var _max = countx(allselcted(Table,table[comorbidities]))
return
countx(filter(summarize(Table, Table[patients], "_1",distinctcount(table[comorbidities])),[_1]=_max),[patients])
If you go to the formatting options for your slicer and go into selection controls, turn single select off and multi-select with CTRL off and turn Show "select all" on.
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 26 | |
| 25 | |
| 22 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 42 | |
| 41 | |
| 40 | |
| 21 | |
| 20 |