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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
ssgtom
Frequent Visitor

Compare own Username to anonymous data

Hi,

 

we made a survey in our company in order to asses some employees.

 

Each assessed employee should be able to see their result in a Power BI report. BUT each employee should only see the own result with the real name, all others shall be shown as "Anonymous xxxxx".

 

The data model can be found here: Data Model

 

 

I can't use the function USERPRINCIPALNAME() in a calculated column. Using a measure doesn't work for me, since I want to use a couple of matrix-visuals. 

 

I tried to create a new table with all possible Usernames and giving this table no relation to other tables at all, so I can apply RLS on this table and use a LOOKUPVALUE() on this table. Didn't work for me neither.

 

I searched forum for a while but couldn't find a solution that works for me.

 

Can anybody help?

2 REPLIES 2
ibarrau
Super User
Super User

Hi. RLS is not apply for a measure. It is for datasources. You can add a rule like UserPrincipalName = USERNAME() for the users table. The option is in Modeling Tab.

 

I think this is what you are looking for.

 

Regards


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

Hi,

 

thanks for the reply, but this is acutally not what I am looking for. RLS (applied on datasource of course) filters all rows that do not match the username. But I do not want to filter them, I just want to replace the name by anonymous for all datasets != Username.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors