Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I am trying to set up RLS by the manager's hierarchy.
Inside the table, I have created additional columns with the managers' hierarchy level.
The data looks like this:
| USER | PARENT | PATH | MANAGER_1 | MANAGER_2 | MANAGER_3 | MANAGER_4 | MANAGER_5 |
Where manager levels 1-6 are the PATHITEM # 1 to 6.
Now I am trying to set up RLS with the next DAX:
SWITCH(TRUE(),
USERPRINCIPALNAME() in VALUES([manager_6]), [manager_6] = USERPRINCIPALNAME(),
USERPRINCIPALNAME() in VALUES([manager_5]), [manager_5] = USERPRINCIPALNAME(),
USERPRINCIPALNAME() in VALUES([manager_4]),[manager_4] = USERPRINCIPALNAME(),
USERPRINCIPALNAME() in VALUES([manager_3]),[manager_3] = USERPRINCIPALNAME(),
USERPRINCIPALNAME() in VALUES([manager_2]),[manager_2] = USERPRINCIPALNAME(),
USERPRINCIPALNAME() in VALUES([USER]), [USER] = USERPRINCIPALNAME())
But I get an error in RLS window:
The VALUES function expects a column reference expression or a table reference expression for argument "1"
I tested a measure with the formula and I works ok.
I can't figure out what is wrong.
Solved! Go to Solution.
I found the workaround.
Instead of using VALUES in RLS window, I used an additional measure for filtering:
I found the workaround.
Instead of using VALUES in RLS window, I used an additional measure for filtering:
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 35 | |
| 34 | |
| 31 | |
| 27 |
| User | Count |
|---|---|
| 135 | |
| 102 | |
| 67 | |
| 65 | |
| 56 |