Forum Discussion

SPaine86's avatar
SPaine86
Helper I
4 years ago
Solved

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.

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

 

2 Replies