Forum Discussion

ghouse_peer's avatar
ghouse_peer
Icon for Post Patron rankPost Patron
2 years ago
Solved

RLS for names available in column

Hi Team   I need your help for below requirement. I have 2 Columns   Leadership and Manager. Leadership Manager ABC EWQ ABC ERT XYZ JKL CDE LKJ CDE OKM QWE LPO TU...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi ghouse_peer ,

     

    Based on your description, this involves concepts related to dynamic RLS. You can do this with username and userprinciplename, but you need to be aware of their differences:
    In Power BI Desktop, username() will return the user in DOMAIN\User format and userprincipalname() will return the user in [email protected] format.
    In Power BI Services, both username() and userprincipalname() will return the user's User Principal Name (UPN). This looks similar to an e-mail address.


    Refer to the following screenshot:

    after publish to the service, test RLS

     

    Also, you can refer to below document:

    Row-level security (RLS) with Power BI - Power BI | Microsoft Learn

    Dynamic Row Level Security with Power BI Made Simple - RADACAD

     

    Best Regards,
    Adamk Kong

     

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