Hi everyone. I'm trying to create a security filter that will filter rows depending on the user (custom) roles (Chef, Super Admin, Admin or Basique).
Super Admin should be able to see every row, Admin only Chef and Basique rows, and Chef can see only Basique rows.
This is the formula i'm using :
IF(INDEX(Current_User[Position], 1) = "Super Admin",
true,
IF(INDEX(Current_User[Position], 1) = "Admin",
and([Position] = "Chef", [Position] = "Basique"),
IF(INDEX(Current_User[Position], 1) = "Chef",
[Position] = "Basique",true)
))
This is the slice i'm using to ref the current user :
Any help is welcomed !
Solved! Go to Solution.
@dbaum wrote:In your case, likely the Current User slice is based on the Users table, in which case the Users table's security filter won't be able to reference the table's own slice.
For filtering your User table, use a Slice instead.
Change your table's security filter to directly reference the USEREMAIL function rather than referencing the Current User slice. Implement a technique based on a cloned subset of your Users table that governs which users have access to rows from the Users table beyond their own row. You can still use the Current User slice elsewhere in your app.
User | Count |
---|---|
18 | |
9 | |
6 | |
5 | |
3 |