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.
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.
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 |
---|---|
65 | |
63 | |
52 | |
37 | |
36 |
User | Count |
---|---|
82 | |
67 | |
61 | |
46 | |
45 |