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

See when key Fabric features will launch and what’s already live, all in one place and always up to date. Explore the new Fabric roadmap

Reply
obriaincian
Resolver I
Resolver I

Filter a table based on multiple values from another table

I have the below calculation that should take an email address, filter the roles table for that email. It should then filter the Master table Company column for the same companies as in the filtered roles table.

 

 

Note, testing@test.com can have multiple companies.

 

The error I'm getting is 

The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.

 

FilteredMasterTable = 
VAR SelectedEmail = "testing@test.com"
VAR SelectedRoles = 
    CALCULATETABLE(
        VALUES('Roles Table'[Company]),
        'Roles Table'[Email] = SelectedEmail
    )
RETURN
    FILTER(
        Master,
        Master[Company]IN SelectedRoles
    )

 

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @obriaincian 

 

Can you provide sample data for testing? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures or Excel. I look forward to your response.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

obriaincian
Resolver I
Resolver I

Note: I want to implement this as Row Level Security but I am testing it in a measure first

 

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

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