Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
I have two datasets -
1 - Employee cell phone usage data
2 - Employee position look up or hierarchy data. This represents a nested set with parent child nodes with a left and right anchor for each node such that by traversing either anchors you can tell who reports to whom and who is the boss of whom.
Trying to implement row level security in a paginated report with with a nested heirarchy/set model. On PowerBI side, we can implement roles using the USERPRINCIPALNAME() and some custom DAX code.
What is the equivalent of USERPRINCIPALNAME() in report builder? For code I know I have to use VB instead of DAX.
In previous paginated reports that I've published where it was essential to capture the ID of the user running the report, I've used the built-in function "UserID" in report builder. This, when run locally (desktop) returns the user id logged in to the PC which in my case happens to be my 5 digit employee ID , e.g. 12345, but on Power BI service, it somehow translates it into the UPN itself which looks like - "EmployeeName@organization.com".
So bottomline, do I even need to worry about a report builder equivalent of UPN and let the API handle it instead? How would that translate to my code?
The desired end result is that every employee should be able to view their own company cell phone usage $$ amounts (base rate, data charges, roaming, etc.) and the bosses should be able to see the usage of all employees under them.
Solved! Go to Solution.
Yeah... this was frustrating. The deadline for this report was approaching fast and at the end, I ended up handling RLS on SQL side by taking the employee ID as a parameter passed to a SQL proc that would trigger the RLS implementation on what rows are returned for proc execution.
This needs to be addressed, i have managed to make this work per Visual but this is just stupid 😄
Give us @UserID etc to be able to filter full datasett like we can in old SSRS and Pagenated Reports, this will chill the RLS stuff, if the user can just see what is relavant to him, this is not an issue on security, just see relevant data per Report Page in Power BI.
@pborah @AlexPowers (yepp Tagged Alex 🙂 worth the try)
Yeah... this was frustrating. The deadline for this report was approaching fast and at the end, I ended up handling RLS on SQL side by taking the employee ID as a parameter passed to a SQL proc that would trigger the RLS implementation on what rows are returned for proc execution.
https://learn.microsoft.com/en-us/power-bi/paginated-reports/paginated-reports-rls
Proud to be a Super User!
@vanessafvg sorry you responded while I was updating my question. The link you provided is basic info on how to set up rudimentary RLS in paginated reports and does not fully apply to my problem. I've already gone over that and several other documentations and forum posts here, stackoverflow, and sqlservercentral.
I'd really appreciate it if you re-read my elaborated question and see if you can help. Thank you.
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
115 | |
112 | |
105 | |
95 | |
58 |
User | Count |
---|---|
174 | |
147 | |
136 | |
102 | |
82 |