Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in BI by (11.1k points)

I am using USERNAME() function in Power Bi If statement and I am getting the following error

CUSTOMDATA, USERNAME, USERCULTURE and USERPRINCIPALNAME functions are not supported in calculated tables/columns. These functions may only be used in Measures or in the AllowedRowsExpression.

How can I resolve it? 

1 Answer

0 votes
by (22.5k points)

Use the following formula

Current User = if(USERNAME() = "domain\user","its me","it aint me")

Want to learn more about Power BI? Check out today: Power BI course  

Browse Categories

...