Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
So I have a table with teams (team_id, team_name), and i have a table with projects (project_id, project_name, owner_team_id, developer_team_id). So each project has a team owning the project, and a team developing the project.
I need to have a teams slicer with multiple selections, and a resulting table showing projects where selected teams are either an owner_team_id or developer_team_id , i.e. all projects relevant to a team shold be listed. Any idea how I can achieve it using DAX?
I've tried FILTER and SELECTEDVALUES, but I didn't get anywhere ;(
The real world case is a bit more compley, with date slicer as well, so projects table is actually already filtered with date slicer, so I need to apply FILTER function on already fileterdd table (with date slicer).
(how can I attach a pbix file to this post?)
Solved! Go to Solution.
You could create a measure like
Team belongs to project =
VAR CurrentTeams =
VALUES ( 'Teams'[Team ID] )
VAR CurrentProjectOwner =
SELECTEDVALUE ( 'Project'[owner team ID] )
VAR CurrentProjectDev =
SELECTEDVALUE ( 'Project'[dev team ID] )
RETURN
IF (
CurrentProjectOwner
IN CurrentTeams
|| CurrentProjectDev IN CurrentTeams,
1
)
and then use that as a visual level filter on the table to only show when the value is 1
Hi @marama ,
Whether the advice given by @johnt75 has solved your confusion, if the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly.
If not, you can refer to the following link and provide the necessary test information to facilitate me to answer your questions as soon as possible.
How to Get Your Question Answered Quickly - Microsoft Power BI Community
Best Regards,
Henry
You could create a measure like
Team belongs to project =
VAR CurrentTeams =
VALUES ( 'Teams'[Team ID] )
VAR CurrentProjectOwner =
SELECTEDVALUE ( 'Project'[owner team ID] )
VAR CurrentProjectDev =
SELECTEDVALUE ( 'Project'[dev team ID] )
RETURN
IF (
CurrentProjectOwner
IN CurrentTeams
|| CurrentProjectDev IN CurrentTeams,
1
)
and then use that as a visual level filter on the table to only show when the value is 1
Thank you. Weird, I had a similar code, but my code returned true/false, and I wans't able to filter the results. Using 1/blank as you suggest, can be filtered. I wasn't aware of the boolean limitation in filter.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
71 | |
70 | |
38 | |
28 | |
26 |
User | Count |
---|---|
97 | |
88 | |
60 | |
43 | |
40 |