Forum Discussion
Is RLS what I need?
RLS will do what you need.
Setting up RLS in the editor is just a GUI for a query. It shows you the list of tables in your dataset, and you can filter on any combination of the fields once certain criteria are met, ie UserID. I think the one problem you may have is I believe you will have to set up a role, for every single one of your users (eg UserID = 'ABC' Filter table for 'ABC' ... UserID = DEF Filter table for 'DEF, etc). I may be wrong, but I believe the filter 'where clause' is static, so you cant build a one fits all dynamic role.
I haven't come across role settings yet - where can I find out about that and where are they defined?
- d_gosbell7 years ago
Super User
If you click on the Modelling tab in Power BI there is a manage roles button which brings up the following dialog box
In the role above users in the role will only see the one "SecureCostCentre" where it is equal to 1111 and this filter will flow down to any related tables.
This filter can be any valid DAX expression. In your case you could use the USERNAME() function in your filter to make a single dynamic role if you have a table in your model with a list of usernames that is then also related to the other tables in your model. So if you had a 'Users' table with a [Login] column you could create a filter expression like the following on your Users table.
Users[Login] = USERNAME()
- philburns7 years agoNew MemberWow thats fantastic, thank you all so much.
I'm going to have fun with this now!!!!