Power BI Feature : Row Level Security

Power BI Feature : Row Level Security

Row Level Security (RLS) is a feature available in Power BI Pro. To know more about what pro content is refer Power BI Pro Content. Roles are defined at Power BI desktop level and role definitions will also be published when the reports are published.

What is this feature all about ?

  • Allows you to restrict data access for users
  • RLS can be configured for both imported data and direct query.
  • RLS feature is not available for Live Connections.

Let’s Get Started !!!

For the example below, I have already created a Power BI Report by region using dummy and random data. Here, I will add row level security feature by region. In the report below, as you see, data is displayed for all regions by default.

RLS Report.jpg

rls-enable

  • The report currently has only three regions –> Central, East and West. I will create roles for each one of them

rls-regions

  • Go to Modelling –> Manage Roles

rls-manage-roles

  • Follow Steps below:
    • Select Create
    • Enter the name of the role.
    • Select the table that has field on which the filter needs to be applied.
    • Enter the value. This expression would return true or false.

rls-create

  • Click Save.

rls-save

  • Repeat the steps for the other regions as well.
  • I have created roles for north and south region as well, assuming that someday the data would get updated for north and south regions as well.

Rls Roles.jpg

  • You can verify the results of the role that is created. Select View As Roles.

rls-view-role

  • Select the role you created and select OK to apply the role on the reports.

rls-view-role-as

  • The report will only display data for Central Region.

rls-repor-central-region-pbid

  • Similarly for west and east regions.
  • You can even view the data by the user by selecting Other user option.

rls-other-user

  • Publish the report.
  • Select the (…) next to the Dataset.

RLS 3 elipsis.jpg

  • Select Security.

rls-security

  • For each role add the e-mail addresses of the members.

rls-email

  • Remove members.

rls-remove-members

  • Test role by selecting (…) ellipsis “Test as Role”

Rls Test Role.jpg

  • Report will display as per the role selected.

RLS PBI Report.jpg

Enjoy Reporting !!!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s