Forum Discussion

unnijoy's avatar
unnijoy
Post Prodigy
1 year ago
Solved

Dynamic RLS based on sub group

I have a table based on Manager's. Its from M1 till M4. Now i need to create an RLS basd on this. Below is the table  M1 M2 M3  M4 Alex George Lilly Jeena Alex George Shane Rose ...
  • v-tejrama's avatar
    v-tejrama
    1 year ago

    Hi unnijoy ,

    Thanks again for your detailed clarification and the use case around additional users like Nithin, Ullas, and Vicky who require access even though they’re not part of the standard M1–M4 hierarchy.

    I’ve reproduced your extended scenario as requested and implemented the following enhancements:

    • Dynamic Row-Level Security (RLS) with secure masking for hierarchy levels (M1–M3)
    • Access control for non-hierarchy users (like Nithin, Ullas, Vicky) using the IsFullAccess and AccessScope logic
    • Secure dropdown slicers that respect visibility rules
    • Masked hierarchy display using DAX measures (e.g: M1_Secure_Measure, M2_Secure_Measure, etc.)

    Output Validation (Using “View As”):

    • Users like Red, Gilly, Grace, Nithin, Ullas, and Vicky were tested.
    • Each user only sees the rows they’re allowed to view.
    • Slicer values are restricted based on their access level.
    • Full access users like Vicky see the entire dataset.

    For your reference, I’ve attached the updated .pbix file containing the complete logic, security setup, and working visuals.

    Feel free to test it using "View As" → Other User for different usernames.