Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. 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.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
11 | |
11 | |
10 | |
10 |
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |