Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi @Suneel_123
You can refer to the following solution
Sample slicer table.
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
Output
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
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
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:
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.
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.