Forum Discussion

marama's avatar
marama
Helper I
3 years ago
Solved

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 ...
  • johnt75's avatar
    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