Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
koushikcs09
New Member

How to design Dynamic RLS with User's role based multiple filtered dimensions value applied Power BI

Maintaining data security has become a crucial requirement for businesses today, especially when dealing with BI reporting. With the increasing number of roles involved in data access, managing row-level security (RLS) has become a complex task. In order to provide secure and filtered data access to each role, businesses need to establish a set of filtering dimensions that would be applied to each role. These dimensions could range from profit centers to sales organizations or even trader/buyer codes. The challenge is to create a system that effectively manages these dimensions for each role and ensures their automatic application when users log into each report. Therefore, the question arises - how can businesses create an efficient RLS system that provides secure and filtered data access to each role, without compromising on the performance of BI reporting?

RLS will be configured for each report, will be applied on below like report source view, within Power BI and will automatically work when the user logs into each report.

SELECT [Ledger]

      ,[Company_Code]

      ,[Fiscal_Year]

      ,[Period]     

      ,[Profit_Center]

      ,[Company_Code_Currency]

      ,[Amount_In_Transaction_Currency]

      ,[Amount_In_Company_Code_Currency]

      ,[Amount_In_Global_Currency]

      ,[Plant]

      ,[Sales_Organization_Code]

      ,[Cost_Center]

      ,[Division_Code]

      ,[Tax_Amount_Transaction]

      ,[Tax_Amount_Company_Code]

      ,[Tax_Amount_Global]

      ,[Net_Amount_Transaction]

      ,[Net_Amount_Company_Code]

      ,[Net_Amount_Global]     

      ,[Plant_Name]

      ,[Plant_Country]

  FROM [Datamart].[View_Vendor_GST_RLS]

User
UserIDUsernameWindowsUserNameActiveFlag
0FF6E238adenton@simsmm.comAP01\adentonY
FAC65EA6afeng@simsmm.comAP01\afengY
0B61D4DEaheng@simsmm.comAP01\ahengY
0DB5B2AAalvaro.caicedo@simsmm.comAP01\alvaro.caicedoY
21A14AA6amgonzalez@simsmm.comAP01\amgonzalezY
Role
RoleIDRolenameFilteringDimensionValue
1AccountantProfit CentresPA051COD
28Accounting ClerkProfit CentresPN102FS
19Accounting ManagerProfit CentresPST01
49AdministratorCompany CodesA005
49AdministratorCost CentresN100133100
49AdministratorPlantsA304
49AdministratorProfit CentresPA204NF
58AP Accountant / Shared ServicesCompany CodesA005
58AP Accountant / Shared ServicesCost CentresN100133100
58AP Accountant / Shared ServicesPlantsA601
58AP Accountant / Shared ServicesProfit CentresPN108NF
RLS
S_NoUserIDRoleIDFilteringDimensionFilterValueActiveFlag
1C4D8B4BA64Purchase OrganizationSG01Y
2CB57A9E111Cost CentresITSA005CC1Y
30FF6E23845PlantsP101Y
4FAC65EA633Trader/Buyer CodeSandy TanY
50B61D4DE50PlantsA208Y
60DB5B2AA43PlantsA601

Y

 

1 REPLY 1
Dhairya
Solution Supplier
Solution Supplier

As per my understanding of your question you can implement RLS in power Bi using following steps.
step1) open manage roles section under modeling pane.
Dhairya_0-1684312809209.png

From here you can you can add different roles with different priveleges to access filtered data by writing simple DAX query.

Dhairya_1-1684313487873.png

Here in above example this will only show data of banglore location to role assigned.



You can test your created roles by clicking on "View as" tab beside "manage role".

Now after publish your report on power Bi service you can share report with different peoples by assigning roles which we created in PowerBI Desktop.

For end-to-end implementation you can refer following video:
https://www.youtube.com/watch?v=gT5-S3raIDo

Please mark my solution as accepted if it worked for you. 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.