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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
SPaine86
Helper I
Helper I

Row level security (relationship clash?)

Hi there,

 

I have a model where staff can be employed across multiple schools (this is controlled by their contract) - see relationships below.

Capture.PNG

When I make the relationship between School and Absence active, the model will accurately count the number of absences and filter by both the contract held and the school where the absence is logged - and this calculates when I use a page filter on the School[School] field.

 

However, when I add Row Level Security (which is based on School[School]), the absences now throw up this error:

Join paths are expected to form a tree, but the table 'Absences' has two join paths to table 'Schools':'Absences'-> 'Basic details'-> 'Contracts'-> 'Schools' and 'Absences'->'Schools' 

 

Is there a way I can make this work? At the moment I have to workaround by making the School > Absences relationship inactive and adding a row from the Basic details table in to the visual (e.g. name), but if I just want a card with a count of the number of absences then the number is always wrong (it includes absences for all schools that member of staff has worked at, not the one that is filtered by RLS).

 

I hope this makes sense - is there a solution here?

 

TIA

 

 

Steve

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@SPaine86 , Make the join between Basic Details and Contract a single directional.

View solution in original post

2 REPLIES 2
SPaine86
Helper I
Helper I

Thank you, I think this has worked. Such a simple solution!

amitchandak
Super User
Super User

@SPaine86 , Make the join between Basic Details and Contract a single directional.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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