Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hi All
I tried to make a dynamic RLS per user, but I was unable to make it access according to requirement.
The requriement would be that users 9 or User 1 can access the for respective Project_id - which is table Core_UserProject
User_id 9 should only view the project_id 1 and 5
User_id 7 should only view the project_id
the dax code I made against the Projects Table :
VAR _Restriction =
CALCULATETABLE(
VALUES( Core_UserProject[Project_id]),
Core_UserProject[Email] = USERPRINCIPALNAME()
)
VAR RLS_Restriction =
SWITCH(
TRUE(),
_Restriction = "None", TRUE(),
Projects[Project_id]=_Restriction,TRUE(),
FALSE()
)
RETURN
RLS_Restriction
Here are the bases and their respective relationship:
Projects
Core_UserProject
sample file link
https://github.com/suvechha/samplepbi/blob/main/sample_info%20-%20security.pbix
Thanks
Solved! Go to Solution.
@ashmitp869 So, normally you would create a user's table that would have the User_id and Email and you would relate that to your Core_UserProject table. Your Core_UserProject table would be related to your Projects table. So you would configure your RLS rule against your Users table using USERPRINCIPALNAME.
@ashmitp869 So, normally you would create a user's table that would have the User_id and Email and you would relate that to your Core_UserProject table. Your Core_UserProject table would be related to your Projects table. So you would configure your RLS rule against your Users table using USERPRINCIPALNAME.
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 4 | |
| 2 | |
| 1 |
| User | Count |
|---|---|
| 19 | |
| 10 | |
| 7 | |
| 6 | |
| 5 |