The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a situation where I need to filter row level security by a couple of different rules. Essentially, I am working with a table that looks something along the lines of this:
ID1 | ID2 | DataField |
101 | 1 | 1424 |
102 | 2 | 125 |
2 | 12412 | |
103 | 2 | 12 |
3 | 645 |
I need to implement RLS on the ID1 field, but in cases where the ID1 field is null - I then need to use the ID2 field.
I also have a security table with users and the associated ID's that they should see - one which relates to ID1 and another that relates to ID2.
I'm attempting to write a DAX expression in the Manage Roles section, but can't get the result that I need. Right now I am able to filter the RLS by only either ID1 or ID2, but not both.
Is there a way that this can be done?
Solved! Go to Solution.
Look into COALESCE.
Keep in mind that RLS rules will be applied cumulatively, with the more permissive rules overriding the more restrictive rules.
Look into COALESCE.
Keep in mind that RLS rules will be applied cumulatively, with the more permissive rules overriding the more restrictive rules.