Security Filters in Table based on Selection of Enum

I am trying to restrict rows in a Locations table to

A. Any User with an “Admin” [Role] OR
B. The user that the record/ row is [assigned to] = USEREMAIL()

When just using [Assigned To] = "USEREMAIL() it functions as expected. However when adding OR to include if the user’s role includes “Admin” the entire expression seems to have no effect. The record appears to always be visible.

In the security filter of the Location table I’m using: OR(IN(Admin, Users[Role]), USEREMAIL() = [Assigned To])

I have a table USERS with [role] (enum of “Admin” or “Driver” selections)

Any thoughts? I read thru the documentation which is how I came up with the expression I’m using. It was the example for the problem I’m trying to solve.

It seems to be showing the view because “Admin” is in the enum as a choice but I want it to show only if “Admin” is selected.

This is TRUE if Admin occurs in the Role column of any row in the Users table.


Thank you Steve. I’m restricting the rows of the table to the user whose email matches the [Assigned To] field but want an Admin to be able to see it. Is the security filter at the table level not the place to accomplish this?

@Steve I think this accomplished my goal:

OR(USEREMAIL() = [Assigned To],IN(LOOKUP(USEREMAIL(), Users, Email, Role), LIST(“Admin”)))

1 Like