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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Suneel_123
Frequent Visitor

Slice with AND condition in Table

Suneel_123_0-1693378694133.png

 

11 REPLIES 11
Anonymous
Not applicable

Hi @Suneel_123 

You can refer to the following solution

Sample slicer table.

vxinruzhumsft_0-1693534939384.png

Create a new measure

Measure = var a=SUMMARIZE(ALLSELECTED('Table'),[Name],"count",COUNTROWS(FILTER('Table',[Tool] in VALUES('Slicer'[Tool]))))
var b=CALCULATE(MAXX(FILTER(a,[Name] in VALUES('Table'[Name])),[count]),FILTER('Table',[Tool] in VALUES('Slicer'[Tool])))
return IF(ISFILTERED('Slicer'[Tool]),IF(b=COUNTROWS(VALUES('Slicer'[Tool])),1,0),1)

 

Then put the measure to the table visual filter

vxinruzhumsft_1-1693535129907.png

 

Output

vxinruzhumsft_2-1693535140080.png

 

vxinruzhumsft_3-1693535146440.png

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Hi @Anonymous 

 

I explored this solution before but what it does is an OR. If you select Tableau and Power BI, it shows Hari, Sabeetha... which is not correct. That's why I tried the approach you can read before. The problem now, is that when nothing is selected, it must show all the table

Suneel_123
Frequent Visitor

I have table name called Table in that table i have two columns like Name and Tool ,when I am selecting in slicer Tableau and SQL then i want to show only who related with Tableau and SQL combination name like with the above screen shot reference i want to show hari name only in table  remaining i do not want to show in power bi dynamically, give me DAX code for this requirement

Hi @Suneel_123 

 

According to your picture, I cannot understand what do you want to achieve? Can you be more specific?

I have table name called Table in that table i have two columns like Name and Tool ,when I am selecting in slicer Tableau and SQL then i want to show only who related with Tableau and SQL combination name like with the above screen shot reference i want to show hari name only in table  remaining i do not want to show in power bi dynamically, give me DAX code for this requirement

 

Suneel_123_0-1693380253675.png

 

But in the slicer you have selected Power BI and SQL? Why?

I still don't see the point

In slicer i have selected 2 tools I want to show data in table who ever know those 2 tools only, I mean that combination only Hari I wana show why because he only know both power bi and sql

Hi @Suneel_123 

 

Following this link: https://rukiatu.com/power-bi-slicer-with-and-condition-to-filter-stacked-bar-chart-for-mulitple-item... I have found the way:

 

Tools with AND Condition = IF( CALCULATE( DISTINCTCOUNT('Table'[Tool]),

ALLSELECTED('Table'[Tool]))

= COUNTROWS(ALLSELECTED('Table'[Tool])),

MIN('Table'[Name]))

 

And in the table, apply in the filter pane, not is blank condition:

mlsx4_0-1693404074678.png

 

Thanks for the solution, but one small issue i am facing here, when i am filter in slicer it acheiving my requirement but when i am clear the filter i can see only name like hari instead of every one in table visual, please look at the below image for reference.

Suneel_123_0-1693474604649.png

 

 

Suneel_123_1-1693474628697.png

 

Hi @Suneel_123 

 

I suppose that it is because Hari is the only with all three values, isn't it? When none is selected, Power BI assumes all values as selected.

Yes i understood but my requirement is if select in slicer that combination I need, if I am not select total names I need to show in table, query which given me is satisfying the logic when I am selecting in slicer but only showing Hari when I am not, can you help me for this.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors