Forum Discussion
unkCandy
Helper I
4 years agoSlicer with AND condition in Power BI For Many To Many relationship
Hello Community, I would like for the multiselection in the slicer to get back the AND between the selection instead of OR. I found on the internet many articles on how to do it but the relationshi...
- 4 years ago
Hi, unkCandy ;
You could create a flag measure.
flag = var _count= CALCULATE(DISTINCTCOUNT([Category]),FILTER(ALLEXCEPT('data','data'[Id]),[Category] in ALLSELECTED('Category Filter'[Category]))) var _count2=CALCULATE(DISTINCTCOUNT('Category Filter'[Category]),REMOVEFILTERS('data')) return IF(_count=_count2,1)Then apply it into table filter.
The final output is shown below:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
unkCandy
Helper I
4 years agoHello Mfelix, thank you for your reply and your time, but maybe I wasn't clear about my problem.
Actually, I created the other table Category Filter to get all products per ID when a category is included in the ID. Now I want if I select two categories to give me the IDs that have both categories, with all products.
I hope I was clear. and thank you again