Using Username() in DAX with Row-Level Security
The trick to getting the DAX function Username() to return the user’s User Principal Name (UPN) in Power BI is to configure Row-Level Security (RLS) on the dataset within the Power BI service. If you haven’t enabled RLS, you may see some odd results.
Last week I posted a video about using Row-Level security in Power BI, and in the comments of the video I received a question regarding how to use Username() within a DAX expression.