Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello!
Y have the following Smart filter by OkViz:
The actual way of each field filtering is with OR logic and i want to change it to AND logic. (The filtered results (usernames) are shown in an other table i've created)
Example: I want to filter every user that matches with "condition1" AND "condition2" that are available when you search them in FIeld 1. And that with every field.
Thank you very much!
Firstly, thank you very much!
But, I have two questions:
1. Those measures, I have to add them to the Searcher visualization or to the Table where I show the results filtered visualization?
2. Those measures work, as I said, for every field of the slicer? Or I have to repeat them (the three ones) for every field of the slicer? (I suppose that when you write Colum, I have to substitute it with the name of the column that is linked to Field 1 for example)
Thank you again!
Hi @ortiz99 ,
Firstly, you can use COUNTROWS function to create a measure to count the number of items selected on the slicer as below.
Number of variables selected on slicer =
IF (
ISFILTERED ( 'Table'[Column] ),
COUNTROWS ( ALLSELECTED ( 'Table'[Column] ) ),
0
)
Then create a measure.
PBISlicer Check =
IF('Table'[Number of variables selected on slicer] = 0, 1,
IF(DISTINCTCOUNT('Table'[Column]) = 'Table'[Number of variables selected on slicer], 1, 0))
Then calculate values which satisfies the ‘AND’ requirement.
measure =
CALCULATE(MAX('Table'[Column]),
FILTER('Table'[Column], [PBISlicer Check] = 1))
You can reference the following links.
Solved: Help setting up a Slicer / Filter with AND logic s... - Microsoft Power BI Community
Best Regards,
Community Support Team _ xiaosun
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 58 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 121 | |
| 96 | |
| 65 | |
| 46 |