Forum Discussion

simona0808's avatar
simona0808
Helper I
4 years ago

RLS

Hello everyone!

I have an app with 2 reports. The first report is the main one including sensitive data, whereas the second report could be shared with everyone(no restrictions). What I want to achieve is to create a group with users give them access only to report 2 and restrict them from report 1. The reports should be in one app. Does someone have any suggestions how this could be done?

 

 

1 Reply

  • simona0808 

     

    Using the username() or userprincipalname() DAX function

    You can take advantage of the DAX functions username() or userprincipalname() within your dataset. You can use them within expressions in Power BI Desktop. When you publish your model, it will be used within the Power BI service.

    Within Power BI Desktop, username() will return a user in the format of DOMAIN\User and userprincipalname() will return a user in the format of [email protected].

    Within the Power BI service, username() and userprincipalname() will both return the user's User Principal Name (UPN). This looks similar to an email address.

     

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

     

    Regards,

    Ritesh