Forum Discussion
jrnhbc
2 years agoFrequent Visitor
Build Model according to one entity being logged in (RLS), not many entities
I'm seeing poor performance because of loads of "many to many" relationships. There's a table where the id is repeated for every possible combination of logged in entity, but each logged in entit...
AllisonKennedy
2 years agoCommunity Champion
jrnhbc I'm not aware of a way to use RLS to alter the cardinality of relationships - Fabric might have something do this but not sure.
From a Power BI point of view, what you could do is add a column to the table to act as the primary key, where you combine the entity_id and other_id into one unique key. That way you can make the relationships 1 to many as you would expect when just one entity_id is logged in.
jrnhbc
2 years agoFrequent Visitor
Great idea - sadly can't use a composite key here as the subsequent tables in the relationship would only have other_id and not entity_id (which is why they're all demanding many to many relationships despite the fact in the published, embedded app this could never happen)