Forum Discussion

maharaj_narayan's avatar
maharaj_narayan
Frequent Visitor
4 years ago
Solved

Row level Security on multiple dimension alias table

Hello All,   We have a current setup of DW tables one fact  which is connected to multiple dimension table, for an example lets take Fact Sales which is connected to multiple Dim Agents tables like...
  • v-jianboli-msft's avatar
    4 years ago

    Hi maharaj_narayan ,

     

    The Row level Security is applied seperatedly , So if you apply the DAX to these three table seperately, it will looks like an inner join.

    ='Dim - Agent_sold'[Agent NT Login]=MID(USERNAME(),FIND("\",USERNAME(),1)+1,LEN(USERNAME())-FIND("\",USERNAME(),1)+1)

     Here is a simple example:

    When I apply RLS to one table:

    Output:

     

     

     

    When I apply RLS to three tables:

    Output:

     

    You can try to apply RLS to Fact-case Table like this:

     

    Final output;

    Please try:

    [Case Created by] = MID(USERNAME(),FIND("\",USERNAME(),1)+1,LEN(USERNAME())-FIND("\",USERNAME(),1)+1) || [Case Modified by] = MID(USERNAME(),FIND("\",USERNAME(),1)+1,LEN(USERNAME())-FIND("\",USERNAME(),1)+1) ||[Case Completed by] = MID(USERNAME(),FIND("\",USERNAME(),1)+1,LEN(USERNAME())-FIND("\",USERNAME(),1)+1)
    

     

    Best Regards,

    Jianbo Li

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.