Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
ThomasWeppler
Impactful Individual
Impactful Individual

Row Level security

Hi Power BI community

I want project leders to only be able to see users in their team. My problem is that a project leader can lead multiple teams and they can lead the same team as another project leader.

 

Table: User
Name: (text) the users name

User_id: (number) a uniq number for each user

Team_id: (number) a uniq number for each team. Multiple users can be in the same team

Leader_team_ids: (text) A list of numbers that shows all the teams a user is a leader of. example: if Leader_team_ids = 10,14,15,16 than it means that the user is the leader of team 10,14,15 and 16

Emal: (text) the users e-mail adresse which I use for RoW level security.

 

All help is greatly appreciated.

1 ACCEPTED SOLUTION
bhanu_gautam
Super User
Super User

@ThomasWeppler You can create this table in Power BI using DAX or import it from your data source.

Ensure that the Leader table has a relationship with the User table on the Team_id.

Go to the Modeling tab in Power BI Desktop.
Click on Manage roles.
Create a new role and use the following DAX expression to filter the User table:

[Email] = USERPRINCIPALNAME() &&
CONTAINSSTRING([Leader_team_ids], SELECTEDVALUE('User'[Team_id]))

 

After publishing the report to the Power BI service, assign the created role to the respective project leaders.




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

2 REPLIES 2
ThomasWeppler
Impactful Individual
Impactful Individual

@bhanu_gautam Thanks for the solution. 🙂

bhanu_gautam
Super User
Super User

@ThomasWeppler You can create this table in Power BI using DAX or import it from your data source.

Ensure that the Leader table has a relationship with the User table on the Team_id.

Go to the Modeling tab in Power BI Desktop.
Click on Manage roles.
Create a new role and use the following DAX expression to filter the User table:

[Email] = USERPRINCIPALNAME() &&
CONTAINSSTRING([Leader_team_ids], SELECTEDVALUE('User'[Team_id]))

 

After publishing the report to the Power BI service, assign the created role to the respective project leaders.




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors