Forum Discussion

zaidmasad's avatar
zaidmasad
Icon for Helper III rankHelper III
8 years ago

Applying Row level security based on users country in dashboards

Hello,

 

I have two tables, one contains each country and its revenues, the other contains the managers and their countries as below:

 

In the manager field there is the Email of each manager.

 

Anyone can advise how can I apply the Row level security in such case?

 

Below is how the table looks like

 

Managers table:

 

Data table:

 

Thanks,

Zaid

 

11 Replies

  • Hello jirineoral,

     

    I have read your article about the low security level, but I couldnt apply it in my case. Can you please help me?

     

    Thanks,

    Zaid

     

  • M_Matuszewski's avatar
    M_Matuszewski
    Frequent Visitor

    use the USERNAME() function in the Row Level Security settings. Mange roles -> create a new role -> select a table with usernames -> Table filter DAX expression , Manager = USERNAME()

      • M_Matuszewski's avatar
        M_Matuszewski
        Frequent Visitor

        do you use bidirectional relationship? if not - use CROSSFILTER function for the measure

  • Anonymous's avatar
    Anonymous
    Not applicable

    HI zaidmasad,

     

    I'd like to suggest you modify the 'cross filter direction' option to 'both' and active the 'Apply security filter in both directions' option.

     

    Regards,

    Xiaoxin Sheng

    • zaidmasad's avatar
      zaidmasad
      Icon for Helper III rankHelper III

      hi Anonymous M_Matuszewski

       

      The relationship is not working, I received the below message:

       

      The country is not a unique value in both sheets.

       

      Appreciate your help.

       

      Thanks,

       

       

       

       

       

      • zaidmasad's avatar
        zaidmasad
        Icon for Helper III rankHelper III

        Anonymous M_Matuszewski

         

        Its working fine now. But I still have one more question regarding the row level security, Do I still have to put in the role the users who belong to that group as below?

         

        .

         

        isnt the excel sheet that contains the name of each user and his country enough?

         

        Thanks,

        Zaid