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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
awhiteway
Helper I
Helper I

Dynamic RLS in DirectQuery Model w/ Many to Many relationship

Hello!

 

Hopefully someone has cracked the code here - I am trying to use dynamic row level security in a DirectQuery model and running into a road block.

 

The rest of my model is one to many relationships with referential integrity, sending over a nicely folded query. However, my dynamic RLS table has the potential for multiple rows and needs to be a many to many relationship. The assume referential integrity option is grayed out despite my understanding of many to many requiring referential integrity. Not being able to click it is resulting in a nasty query being folded and sent over instead of joining the dynamic RLS object inside of the query. 

 

Any ideas or is this just a hard stop with PowerBI restrictions on assume referential integrity & many to many relationships?


Thank you!

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

@awhiteway - So there is no way to build a bridge table between your two tables with the many-to-many relationship? Best to avoid many-to-many relationships and use bridge tables if at all possible in my opinion.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

I had the same thought - but while I could put a bridge table and enable it there- the upstream table not being part of the folded query still causes the performace hit. Essentially it seems a many to many relationship can't exist anywhere in the chain? That makes Dynamic RLS very tough to do

Hi @awhiteway ,

"Essentially it seems a many to many relationship can't exist anywhere in the chain?"

-In the direct query mode, the many-to-many relationship is not impossible to exist, but needs to be avoided, such as using bridge tables, because it can lead to query statements that don't perform well.
In addition, your report performance depends largely on the performance of the underlying data source in direct query mode, so although creating a bridge table may reduce performance, it is a more feasible method

 

Best Regards,
Yingjie Li

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

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.

Top Solution Authors