Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
To avoid using RLS I've made some calculated tables filtering on
CamEmail=CurrentUser, and for the test setting CurrentUser="someone@mycompany.com"
Ideal I should now set CurrentUser=USERPRINCIPALNAME() but as you know that is not supported in calculated tables.
Is there a way to store USERPRINCIPALNAME() as a static variable initiated when loading the report (as there are in most other languages)? And then set like CurrentUser=StaticVariabel?
Solved! Go to Solution.
Hi @jmkvalsund ,
Yes, it is not possible to use the USERPRINCIPALNAME function in a calculated column or in a calculated table.
and, there are no native functions in Power Query that can do this.
Check the following threads to see if using measure to filter visuals meets your needs(Please replace USERNAME in the formula with USERPRINCIPALNAME).
Solved: Error on using UserName() function in custom table
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
Hi @jmkvalsund ,
Yes, it is not possible to use the USERPRINCIPALNAME function in a calculated column or in a calculated table.
and, there are no native functions in Power Query that can do this.
Check the following threads to see if using measure to filter visuals meets your needs(Please replace USERNAME in the formula with USERPRINCIPALNAME).
Solved: Error on using UserName() function in custom table
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 103 | |
| 80 | |
| 62 | |
| 50 | |
| 45 |