Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Visuals filtering based on the username()

Hi Team,

 

I have two columns, EmpID and MgrID with RLS (role) created as EmpEmail = username() || MgrEmail = username().

 

This gives the rows where an email id is listed in EmpEmail or MgrEmail.

 

I have a single card visual where i would like to show the EmployeeName who logged in.

 

Due to the RLS settings, the sigle card is picking up names of Employee as well as his reportees as his email id can be found in MgrEmail.

 

So what is the best way to restrict this card visual to show only the user logged excluding his direct reportees.

  • Hello Anonymous ,

     

    why don't you create a measure that gives back the USERNAME() or USERPRINCIPLENAME()?

    User = USERPRINCIPLENAME()

     

    If you need any help please let me know.
    If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍

    Best regards
    Denis

    Blog: WhatTheFact.bi

4 Replies

  • selimovd's avatar
    selimovd
    Icon for Most Valuable Professional rankMost Valuable Professional

    Hello Anonymous ,

     

    why don't you create a measure that gives back the USERNAME() or USERPRINCIPLENAME()?

    User = USERPRINCIPLENAME()

     

    If you need any help please let me know.
    If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍

    Best regards
    Denis

    Blog: WhatTheFact.bi

    • selimovd's avatar
      selimovd
      Icon for Most Valuable Professional rankMost Valuable Professional

      Hey Anonymous ,

       

      did it work with the measure?

      I'm curious if you could solve this issue 🙂

       

      If you need any help please let me know.
      If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
       
      Best regards
      Denis
       
      • Anonymous's avatar
        Anonymous
        Not applicable

        selimovd 

         

        Hi Selimovd, Thanks for checking on this.  Yes your answer helped me. Thanks a lot.