Forum Discussion
Row Level Security Errors
- 10 days ago
Hi Lucy01 ,
Create a separate DimTeam table containing one unique row per team:
DimTeam = DISTINCT('DataSheet'[Team])Then create a 1-to-many relationship:
DimTeam[Team] (1) -> DataSheet[Team] (*)Keep your Team Access table as the mapping of UserUPN -> Team. Apply RLS using USERPRINCIPALNAME() to identify the user and return their team, then filter DimTeam.
The flow should be:
User -> Team Access -> Team -> DataSheetThis avoids trying to use DataSheet[Team] directly in the RLS expression when it contains multiple rows.
Thanks!!
Thank you, could you please explain a little more about the dimension/relationship, I'm not sure how to approach that?
Hi Lucy01 ,
Create a separate DimTeam table containing one unique row per team:
DimTeam = DISTINCT('DataSheet'[Team])
Then create a 1-to-many relationship:
DimTeam[Team] (1) -> DataSheet[Team] (*)
Keep your Team Access table as the mapping of UserUPN -> Team. Apply RLS using USERPRINCIPALNAME() to identify the user and return their team, then filter DimTeam.
The flow should be:
User -> Team Access -> Team -> DataSheet
This avoids trying to use DataSheet[Team] directly in the RLS expression when it contains multiple rows.
Thanks!!