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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
GAPER
Post Patron
Post Patron

Using table like below to create row level security

I have a mapping table like this. How do I write a formula to filter projects only show = 1 for each individual?

I was thinking using userprincipalname() but it's a measure so it' cant be used as a filter. Thanks!

 

 

EmailProjectShow
person1@abc.comProject 11
person1@abc.comProject 21
person1@abc.comProject 30
person1@abc.comProject 40
person2@abc.comProject 11
person2@abc.comProject 21
person2@abc.comProject 31
person2@abc.comProject 41

 

Clafirication: this is just an extra filter table. I have an underlying data table for example

 

Project Revenue 

 

Project 1 100

Project 2  200

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @GAPER ,

Thanks @FarhanAhmed  for sharing, here are some suggestions that I hope will be helpful to you.
You can write the formula when creating the role:

[Email] == USERPRINCIPALNAME() && [Show] == 1

vkaiyuemsft_0-1711502957956.png

 

The formula uses this function to dynamically filter items based on the logged in user's email and the "show" column in the mapping table.
Roles can be tested using views as, which allows you to simulate the experience of a user assigned this role.

vkaiyuemsft_1-1711502976893.png

 

vkaiyuemsft_2-1711502976894.png

 

 

For more information about RLS, please refer to the document: Row-level security (RLS) with Power BI - Power BI | Microsoft Learn.

 

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @GAPER ,

Thanks @FarhanAhmed  for sharing, here are some suggestions that I hope will be helpful to you.
You can write the formula when creating the role:

[Email] == USERPRINCIPALNAME() && [Show] == 1

vkaiyuemsft_0-1711502957956.png

 

The formula uses this function to dynamically filter items based on the logged in user's email and the "show" column in the mapping table.
Roles can be tested using views as, which allows you to simulate the experience of a user assigned this role.

vkaiyuemsft_1-1711502976893.png

 

vkaiyuemsft_2-1711502976894.png

 

 

For more information about RLS, please refer to the document: Row-level security (RLS) with Power BI - Power BI | Microsoft Learn.

 

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

GAPER
Post Patron
Post Patron

this is the extra layer of information i used to filter the table. Not the underlying table

FarhanAhmed
Community Champion
Community Champion

Why can't you filter out Show=0 from your data source or in Power Query?







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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