Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi
I have a table which I need to add some restrictions to, but am not sure how to do this in the desktop app.
First, all users have been upgraded to Power BI Pro.
I want to restrict the data by the user name within the data. So I have a column in the table that has the user. Is there a way for me to do this, so when they log into Power BI online, they see only the data assigned to them?
The next level on this is within the table there is also a user called NBD, which is a generica bucket of accounts. I want each user to not only see just their data, but I want NBD to be included in this as well. Is there a way to also successfully do this as well?
Emma
Hi @emma313823 ,
For your case, you need to set roles for thousands of users, so we need dynamic RLS.
USERNAME() returns the domain name and user name of the current connection with the format of domain-name\user-name.
It is worth noting that If a user has access to a particular row of data, they can see all the columns of data for that row. So we cannot use RLS to limit the columns or measures accessible by my users.
Here are RLS related blog posts.
https://radacad.com/dynamic-row-level-security-with-manager-level-access-in-power-bi
https://radacad.com/dynamic-row-level-security-with-organizational-hierarchy-power-bi
https://radacad.com/dynamic-row-level-security-with-power-bi-made-simple
Best regards,
Eyelyn Qin
Hi @emma313823
You can use Row Level Security (RLS) to do this.
Here is an article to get you started.
https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-rls
Hi
Thanks for this link. I guess I'm still confused on what to do.
The article says...You can use username() within this expression. Be aware that username() has the format of DOMAIN\username within Power BI Desktop
I don't know what I'm supposed to put in for domain - is this something I obtain from the online admin account?
I selected my table and entered username(bakerd@crowleyassociates.com). I selected the check box and it shows I have some syntax error.
https://powerbi.microsoft.com/en-us/blog/using-username-in-dax-with-row-level-security/
This link will explain to you how to use username() in row level security.
User | Count |
---|---|
140 | |
113 | |
104 | |
76 | |
63 |
User | Count |
---|---|
135 | |
126 | |
110 | |
70 | |
61 |