Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello!
Not sure if I am overthinking it, but I need to filter out all rows related to the same ID, based on a criteria from another column, using a slicer.
Example:
ID | Team |
1 | TeamA |
1 | TeamB |
1 | TeamC |
2 | TeamB |
2 | TeamC |
3 | TeamA |
3 | TeamC |
Essentially with this example, I would want a slicer with all the Teams and when the user selects TeamA for instance, the only result would be ID 2 (with its other corresponding data).
I would be using this in a bar chart, that counts the ID per team.
Thank you!
Solved! Go to Solution.
Hi @adawo_ ,
According to your description "when the user selects TeamA for instance, the only result would be ID 2", here's my solution.
1.Create a new table with all teams, don't make relationship with the two tables.
Team = VALUES('Table'[Team])
2.Create a measure.
Measure =
IF (
COUNTROWS (
FILTER (
ALL ( 'Table' ),
'Table'[Team] = SELECTEDVALUE ( Team[Team] )
&& 'Table'[ID] = MAX ( 'Table'[ID] )
)
) > 0,
1,
0
)
Put the new created Team table in slicer and columns from fact table in visual, then put the measure in visual filter, select show items when the value is 0.
After apply filters, get the correct result:
I attach my sample below for your reference.
Best regards,
Community Support Team_yanjiang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @adawo_ ,
According to your description "when the user selects TeamA for instance, the only result would be ID 2", here's my solution.
1.Create a new table with all teams, don't make relationship with the two tables.
Team = VALUES('Table'[Team])
2.Create a measure.
Measure =
IF (
COUNTROWS (
FILTER (
ALL ( 'Table' ),
'Table'[Team] = SELECTEDVALUE ( Team[Team] )
&& 'Table'[ID] = MAX ( 'Table'[ID] )
)
) > 0,
1,
0
)
Put the new created Team table in slicer and columns from fact table in visual, then put the measure in visual filter, select show items when the value is 0.
After apply filters, get the correct result:
I attach my sample below for your reference.
Best regards,
Community Support Team_yanjiang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 |
---|---|
13 | |
13 | |
11 | |
8 | |
8 |
User | Count |
---|---|
17 | |
10 | |
7 | |
7 | |
7 |