Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join 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.

Reply
marama
Helper I
Helper 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 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?)

1 ACCEPTED SOLUTION
johnt75
Super User
Super 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

View solution in original post

3 REPLIES 3
v-henryk-mstf
Community Support
Community Support

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

johnt75
Super User
Super 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

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.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.