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

How to use Userprincipalname() in column?

Hi all,


I want to compare USERPRINCIPALNAME () dax function with other column (Email column) and get the result as Name of that user. Is it possible in power bi?


I have created one measure like,

UserEmail = IF(Contains(values(user[Email]),[Email], Userprincipalname()),"Yes","No")

From above measure, Iam getting YES, if user exist. Then I need Name(value is from other column) of the user in column/measure. Again I need to compare that user name with another table column for getting efforts of the user based on criteria.


Can any one help me on this please?


Thanks in advance!

Community Support
Community Support

Hi @Davidu ,

This function is not supported in calculated tables/columns. It may be only used in Measures.


Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors
Top Kudoed Authors