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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Row level security without relationship?

So I'm trying to implement dynamic RLS for days now, I'm loosing my mind 🙂

. I've read all the Radcad articles about it, but I keep getting stuck at one point. How do you implement a user table defining the level of security when you don't have a single column (but multiple) on which you can define a relationship in the fact table?

 

I have a table dertermining the security roles, where a single emailadres can have access to several CC-Names (see Ian@example.nl) and a single CC-Name can have multiple emailadresses (see Consulting CI)

CC-NameIDParentIDEmail
Consulting CI12Ian@example.nl
Advisory Consulting23Peter@example.nl
Advisory34Chris@example.nl
Advisory Total45Sara@example.nl
TOP5 Zoe@example.nl
Consulting PS62Ian@example.nl
Consulting CI12andreas@example.nl

 

The fact table consists of a row for every employee depicting the total cost center structure they belong to: 

 

EmployeeIDCCL1CCL2CCL3CCL4CCL5Score
1Consulting CIAdvisory ConsultingAdvisoryAdvisory TotalTOP5
2Consulting CIAdvisory ConsultingAdvisoryAdvisory TotalTOP5
3Consulting CIAdvisory ConsultingAdvisoryAdvisory TotalTOP5
4Consulting CIAdvisory ConsultingAdvisoryAdvisory TotalTOP52
5Consulting CIAdvisory ConsultingAdvisoryAdvisory TotalTOP14
6Consulting CIAdvisory ConsultingAdvisoryAdvisory TotalTOP17
7Consulting PSAdvisory ConsultingAdvisoryAdvisory TotalTOP15
8Consulting PSAdvisory ConsultingAdvisoryAdvisory TotalTOP19


My question: how can I link those two tables together in order to create dynamic RLS? Is that really neccessary, or can I do something fancy with disconnected tables?

Thanks so much!

 

Best, Strike88

4 REPLIES 4
ibarrau
Super User
Super User

Hi. RLS can be tricky, but you can do that. I'm spoiling my blog with this post because I was going to write about this haha.

You can try adding a rule in your fact table RLS like this:

[EmployeeDCCL1] IN SUMMARIZE(FILTER(First_table, First_Table[Email] = USERNAME()), Fist_table[CC-Name])

I should show the cc-names of that email and check with the "IN" if they are in the fact.

In addition to this, let me warn you that RLS should be applied to dimension. Applying rls to facts can result in low performance.

 

Hope this works.


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

Happy to help!

LaDataWeb Blog

Anonymous
Not applicable

Hi @ibarrau ,

 

Thanks for trying to help me, I'm really enjoying this communicty!

Unfortunately, I did not solve my issue with your solution. See screenshot below. What did I do wrong?

Strike88_0-1592829747355.png

 

Do I need to create a relationship between the tables?

 

Thanks in advance!

amitchandak
Super User
Super User

@Anonymous , I saw this long back. But I remember they shown come calculation around RLS. Check if this can help

https://community.powerbi.com/t5/MBAS-Gallery/Microsoft-Power-BI-Unleash-row-level-security-patterns-in-Power/td-p/712613

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi @amitchandak , 

 

Thanks for taking the time to get back to me. This doesn't solve my issue unfortunately, or I'm missing something.. I'm in need of help to implement this. How would that work for my particular situation?

 

Best regards, 

Helpful resources

Announcements
Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.