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
datajunkie_29
Helper I
Helper I

Dynamic RLS with Hierarchy for Embedded Paginated Reports in Power BI Desktop

Hello Power BI Community,

 

I hope this message finds you well. I am reaching out to seek your expertise and guidance on a challenge I am currently facing with implementing dynamic Row-Level Security (RLS) with Organizational Hierarchy in an embedded paginated report.

 

I have successfully implemented dynamic Hierarchy RLS for standard Power BI reports. The RLS is designed to allow Level 1 employees to view only their data, Level 2 employees to see their data as well as the data of all employees at Level 1 reporting to them, and so forth.

 

While this dynamic Hierarchy RLS is working seamlessly for Power BI reports, I have encountered an issue with embedded paginated reports. Example, Level 1 employees can see not only their own data but also the data of their peers at the same level.

I would greatly appreciate any guidance or assistance from the community on resolving this issue. If anyone has experience resolving such challenges with embedded paginated reports in Power BI Desktop, your insights would be invaluable.

 

Any suggestions, best practices, or troubleshooting tips to ensure that the RLS filters out data accurately, maintaining the hierarchical structure for embedded paginated reports as well.

 

Thank you in advance for your time and expertise. I look forward to your insights and suggestions.

1 ACCEPTED SOLUTION
datajunkie_29
Helper I
Helper I

Hello All,

 

I was finally able to get it resolved and have dynamic RLS implemented in Paginated report. Please find my steps below:

  • Connected my Paginated report to the Power BI Dataset on which dynamic RLS was implemented.
  • Utilized the PATH column created using a Power BI DAX-supported function, to filter the dataset based on the signed-in user's USERID.
  • Add a Calculated column in the dataset, for accurate matching of the user's ID with PATH values, considering both the beginning and end of the path, the filter expression for the calculated column was as follows:
  • LoggedInAs =

IIf(Fields!ManagerID.Value = User!UserID Or InStr("|" & Fields!ManagerPath.Value, "|" & Parameters!UserUserID.Value & "|") > 0 Or InStr(Fields!ManagerPath.Value & "|", "|" & Parameters!UserUserID.Value) > 0, 1, 0 )

  • Following this, I applied a report-level filter where I set 'LoggedInAs = 1'.

Please adjust this expression based on your dataset structure and the way path information is stored. Apply the filter based on this calculated field in your report to achieve the desired result. 

 

Hope this helps!

Thanks

View solution in original post

3 REPLIES 3
datajunkie_29
Helper I
Helper I

Hello All,

 

I was finally able to get it resolved and have dynamic RLS implemented in Paginated report. Please find my steps below:

  • Connected my Paginated report to the Power BI Dataset on which dynamic RLS was implemented.
  • Utilized the PATH column created using a Power BI DAX-supported function, to filter the dataset based on the signed-in user's USERID.
  • Add a Calculated column in the dataset, for accurate matching of the user's ID with PATH values, considering both the beginning and end of the path, the filter expression for the calculated column was as follows:
  • LoggedInAs =

IIf(Fields!ManagerID.Value = User!UserID Or InStr("|" & Fields!ManagerPath.Value, "|" & Parameters!UserUserID.Value & "|") > 0 Or InStr(Fields!ManagerPath.Value & "|", "|" & Parameters!UserUserID.Value) > 0, 1, 0 )

  • Following this, I applied a report-level filter where I set 'LoggedInAs = 1'.

Please adjust this expression based on your dataset structure and the way path information is stored. Apply the filter based on this calculated field in your report to achieve the desired result. 

 

Hope this helps!

Thanks

Habitat
Regular Visitor

Hi @datajunkie_29 ,

 

Dynamic RLS with Hierarchy for Embedded Paginated Reports currently can not be set RLS, it is recommended to set up in the dataset, and then connect to the dataset to develop pagination report

 

Best regards

Morty

Hi @Habitat , 

 

Thank you so much for your prompt response. I've connected the paginated report to the Power BI dataset with RLS implemented, but I'm unsure whether there are specific filter expressions that I should manually pass through, or if it automatically flows through. Any guidance on how I can effectively test this would be greatly appreciated!

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.

Top Kudoed Authors