Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi all,
I am trying to work this out for ages. I found many different solutions online, but nothing worked. It's a simple one table one slicer solution. I need to filter the ID by the selected rules in the slicer. PBI default is OR condition, but I need to change it to AND.
data:
IDRule
1 | a |
2 | a |
2 | b |
3 | c |
3 | a |
3 | d |
4 | b |
4 | a |
5 | b |
6 | d |
6 | e |
7 | d |
7 | e |
7 | a |
7 | f |
7 | g |
8 | d |
8 | a |
9 | e |
10 | a |
10 | d |
Thanks 🙂
Solved! Go to Solution.
@WOLFIE , Try Measure
measure =
var _cnt = calculate(DistinctCount('Table'[Rule]) ,allselected('Table'))
return
countx(filter(summarize('Table', 'Table'[ID], "_1", DistinctCount('Table'[Rule])),[_1]=_cnt),[ID])
or
measure =
var _cnt = calculate(DistinctCount('Table'[Rule]) ,allselected('Table'))
return
calculate(countx(filter(summarize('Table', 'Table'[ID], "_1", DistinctCount('Table'[Rule])),[_1]=_cnt),[ID]), filter(allselected(Table), Table[ID] =max(Table[ID])))
@amitchandak Quick additional question 🙂 I need the table to keep all values when nothing is selected in the slicer. I tried this, but it doesn't work:
@amitchandak Quick additional question 🙂 I need the table to keep all values when nothing is selected in the slicer. I tried this, but it doesn't work:
SOLVED 🙂
@WOLFIE , Try Measure
measure =
var _cnt = calculate(DistinctCount('Table'[Rule]) ,allselected('Table'))
return
countx(filter(summarize('Table', 'Table'[ID], "_1", DistinctCount('Table'[Rule])),[_1]=_cnt),[ID])
or
measure =
var _cnt = calculate(DistinctCount('Table'[Rule]) ,allselected('Table'))
return
calculate(countx(filter(summarize('Table', 'Table'[ID], "_1", DistinctCount('Table'[Rule])),[_1]=_cnt),[ID]), filter(allselected(Table), Table[ID] =max(Table[ID])))
The second one works! 🙂 Thanks so much!!!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
16 | |
13 | |
12 | |
11 | |
11 |
User | Count |
---|---|
19 | |
14 | |
14 | |
11 | |
9 |