Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

Using username() to obfuscate user information



We provide client-facing embedded PBI reports on our cloud platform.

We have recently added Role-Based Access control to our platform, and the call to the embedded report passes a switch code and can be accessed within the report through username()

I need to obfuscate user data based on the username() value.


What I would like to be able to do is......

Column = if(username() = "A", "Obfuscate Data", [Name])

This would obfuscate all [names] for the given list. Measure only gives an aggregate.


Any help would be really appreciated.

Thank You.




Responsive Resident
Responsive Resident

Re: Using username() to obfuscate user information



have you tried using row level security?


Row Level Security - Power BI Embedded  

Helpful resources

Community Conference

Power Platform Community Conference

Come join us today! Find your favorite faces from the community presenting at the Power Platform Community Conference!

Upcoming Events

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors