Power BI Security

Security in Power BI

Data Security is the most important aspect when we share the data with others, they could be external clients or internal stakeholders. Often times we don’t want to share all the data with everybody. For example when we are sharing the file with regional managers what is the point of sharing other region’s sales data to the “South zone manager. So with this regard, we can create security access in Power BI while sharing the reportPower BI While Sharing The ReportThe share button is the most basic way to share a report. Other options include using the workspace, publishing the report to the web, embedding it in Share Point, and secure embedding.read more.

In this article, we will take you through the process of building row-level security access in Power BI.


You are free to use this image on your website, templates etc, Please provide us with an attribution linkHow to Provide Attribution?Article Link to be Hyperlinked
For eg:
Source: Power BI Security (wallstreetmojo.com)

Row Level Security

Data is stored in rows and columnsRows And ColumnsA cell is the intersection of rows and columns. Rows and columns make the software that is called excel. The area of excel worksheet is divided into rows and columns and at any point in time, if we want to refer a particular location of this area, we need to refer a cell.read more, so when we want to share the data with a larger group all of them don’t want to see all the rows of data. So we can create “row-level security” in power bi to enable the specific person to see an only specific set of data.

For example, a sales manager of “India” has to see only the data of “India” region sales numbers, and the overall business head can see all the region’s data. So this is the kind of security that we need to create before sharing the data, and this is called “Row Level Security.”

Create Row Level Security in Power BI

To create row-level security, we need to have some sort of data, and we have already created a simple chart in Power BI.Chart In Power BI.There are many types of visualization techniques in POWER BI, and the most important and extensively used is a chart, which is used in every report or dashboard to display data. There are inbuilt charts in POWER BI to use, with an option to make combo charts or custom made charts.read more

You can download the workbook to use the same file as we used in this example.

You can download this Security in Power BI Excel Template here – Security in Power BI Excel Template

Below is the chart created in Power BI to show the product-wise sales chart.

Power BI Security - Bar Chart

At this moment, we have overall all the countries’ sales based on different products. Now we need to create row-level security to show only specific country sales based on products, and below are the countries we have on this list.

Canada, France, Germany, Mexico, and the United States of America.

Follow the below steps.

  1. Under the MODELLING tab, click on “Manage Roles.”

    Power BI Security - Manage Rules

  2. This will open up the “Manage Roles” window like the below one.

    Power BI Security - Manage Role Window

  3. Click on the “Create” option to create the first country role.

    Power BI Security - Create Role

  4. Give a name to this role. Since we are creating first country security, give the names as “Canada.”

    Power BI Security - Create Role Name

  5. Next, we have the table name as “Data Table” click on the ellipsis (three dots) it will show the “Add Filters” option.

    Power BI Security - Add Filter

  6. Hover on “Add Filter” it will open up all the columns in the table. Since we are applying country-wise row-level security, choose the option of the “Country” column.

    Power BI Security - Add Filter (Country)

  7. Using the “DAX” expression, we need to create a role here. Enter the country name in double-quotes. Click on “Save” to close the “Manage Roles” window.

    Power BI Security - Table Filter (Dax Expression)

  8. Now, we have created row-level security for the country “Canada.”

    Under the MODELING tab next to the option of “Manage Roles,” we have an option called “View as Roles” click on this.

    Power BI Security - View Roles
    This will open up the roles list that we have created.

  9. Choose the role “Canada” and click on “Ok.”

    Power BI Security - Select Role

  10. Now we can see only the “Canada” country sales chart only.

    Power BI Security - Canada Report

As you can see at the top of the chart, it shows “now viewing the report as Canada” to go back to the older chart, we can click on the “Stop Viewing” option.

Like this creates roles for other countries as well.

Now in Power BI services, we need to assign the email id’s to share the report.

Configure Power BI Services

  • Publish the report to Power BI Services by clicking on the “Publish” option in Power BI Desktop.
Publish Option
  • Now log in to the Power BI Services account in the Power BI services account, it will be published in My Workspace.
Power BI Security - My Workspace
  • Click on three dots in front of the published article under Dataset.
Power BI Security - Configure
  • Choose the “Security” option.
Select Security Option
  • It will show a row-level security option for you. Enter the email address of the respective sales manager here and click on the “Add” option.
Row Level Security

Now save it. Like this, we can create row-level security in Power BI.

Note: Power BI dashboard file can also be downloaded from the link below, and the final output can be viewed.

You can download this Power BI Security Template here – Power BI Security Template

Things to Remember

  • Once the Row Level Security is created in Desktop, you need to publish the report to Power BI Services, and you need to have a paid version to share the report with the concerned person.
  • Only filtered data can be viewed from the concerned person.

This has been a guide to Power BI Security. Here we discuss how to build row-level security access while sharing power bi reports using an example. You can learn more from the following articles –

  • 35+ Courses
  • 120+ Hours
  • Full Lifetime Access
  • Certificate of Completion