Forum Discussion

jmunn's avatar
jmunn
Advocate I
1 year ago
Solved

Multiple Role-Playing Dimension and RLS

Hi,    I've browsed around existing questions for a while but so far haven't seen my issue, and ChatGPT is giving me the runaround so far, so figured I would post my question. It has to do with the...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi, jmunn 

    Based on the image you showed at the end, I've created a simple data set:

    My relationship is as follows:

    I created an RLS role as follows:

    FACT Table DAX:

    VAR _user_location = MAXX(FILTER('UserInfo','UserInfo'[Email] = USERPRINCIPALNAME()),'UserInfo'[Location])
    VAR _table = SELECTCOLUMNS(CALCULATETABLE('REF',FILTER('REF','REF'[Location] = _user_location)),'REF'[DepartmentArrivalCombination])
    RETURN 'FACT'[DepartmentArrivalConcatenated] IN _table

    Be able to get the results you expect:

    I've uploaded the PBIX file I used this time below.

     

     

    Best Regards

    Jianpeng Li

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