Forum Discussion
Ben1981
9 months agoHelper III
RLS based on CONTAINSSTRING?
Hi, Is there a way with RLS to filter a column based on if a value is contained within a string? I have two tables setup, HR People and HR Hierarchy, no connected to each other but can be via ...
- 9 months ago
Hello Ben1981
try with this DAX code
In your RLS role definition (for table 'Dim HR Hierarchy')VAR _UserID =
MAXX(
FILTER('Dim HR People', 'Dim HR People'[Email] = USERPRINCIPALNAME()),
'Dim HR People'[ID Key]
)
RETURN
CONTAINSSTRING('Dim HR Hierarchy'[Path], _UserID)
If my response helped you, please consider clicking
Accept as Solution ✅ and giving it a Like 👍 – it helps others in the community too.
Thanks,
Connect with me on:
LinkedIn
v-pnaroju-msft
9 months agoCommunity Support
Hi Ben1981,
Please share some sample data that shows your problem or question clearly in a simple and organized way (not as an image). This will help us understand and solve the issue better. Make sure the data is relevant, does not have any sensitive information, and is related to your problem. Also, please tell us what result you expect from this example.
Thank you.