DATA PRACTICE

Practice #2 - Data Governance: How to apply Row Level Security?

Given the strategic nature of data, data governance is essential to strengthen the security of an organisation. Compliance and usage planning drives business results. In the face of these challenges, line-level security in Power BI is a solution for managing roles and access to data.

In this article you will see:

  • The importance of data governance
  • How to apply line level security

I. The importance of data governance

Data governance is first and foremost a framework within an organisation. It brings together a set of processes and roles that enable the efficient and harmonious use of data. Good data governance allows an organisation to :

  • Control access and roles of employees
  • Strengthening the security of structures and services
  • Develop the quality of methods and deliverables
  • Boosting knowledge sharing between stakeholders
  • Maintaining ownership of data and information

On an enterprise scale, data governance includes several interdependent entities. Here are 5 axes of data governance:

Source : Quora - data gouvrernance

For this article, we will only focus on the security part, in particular on security at the Power BI level.

II. How to apply security at the line level

Row-level security is a process for managing roles and data in Power BI. It also prevents multiple workspaces and duplicate datasets.

Case study: We will see how to apply security levels for members of a company in two different countries. We will use the same dataset to define a specific filter for each country.

The expected result is that team members and managers will be able to see only the data for their country and share reports in real time.

Two platforms will be used for this case study:

  1. Power BI Desktop
  2. Power BI Service

Below are all the steps to follow:

1.       In Power BI Desktop:

1.1. To start, open the main page of Power BI Desktop and choose the source of your data. In our example, we will use an Excel file:

1.2.  After opening your data source, select and load the file to be analysed. Example: "Sales_Europe

1.3.  After loading the data in Power BI Desktop, choose the "Data" mode to view the content before defining the role structure. You will find the two countries to be considered for the creation of the roles:

1.4. To apply the roles according to these two countries, choose the "Model" mode and select the "Manage roles" option in the "Security" tab:

1.5. In the "Manage Roles" tab, you can successively :

  • Create a role (Example: France)
  • Select the relevant table (Example: Europe)
  • Put the expression DAX (Example: [Country] = "France")

1.6.  Create a new role for the second country "Germany":

1.7. To see the result of the created roles, choose the "Data" mode and select the "View as" option. We find the two new roles for the two countries:

1.8. By activating the role for "France", for example, you will only see the filtered data for this country:

1.9. In the report mode, you can create visuals and view data in a simpler way:

1.10. By stopping the "View as" mode, you will have a global view:

1.11. Finally, in order to integrate a team leader or a company member in one of the two roles, we must first register and publish the model created in Power BI Service :

2.       In Power BI Service :

2.1. After publishing the created model or report, you can find it in a workspace in Power BI service :

2.2. In the workspace, find the dataset and the report:

2.3 On the dataset, select the three "More options" dots and choose the "Security" option:

2.4. Add the members involved in each role:

2.5. After adding the members or leaders in their respective roles, choose the three horizontal dots in the same row as the role concerned. Example "France":

2.6. Here is the final result, you can have an overview of the information that the members of each country can consult. Example: The data for "France" in the workspace:

In summary, we have used line-level security to manage access to data for different members of a company. This method can be generalised to employees in the same department or entity.

To go further :

Thank you for reading,

Fodé DIABY

---

#governance

#security

#data

#analytics

#service