Forum Discussion
marama
3 years agoHelper I
How to filter for multiple slicer values?
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 ...
- 3 years ago
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
johnt75
3 years agoSuper User
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
- marama3 years agoHelper I
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.