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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Issue with Username() and userprinciplename()

Hi team,

 

I have an issue in getting the username() who logged into the report. It says something's wrong with one or more fields.  Kindly help me why this is not working.

 

LPD280388_0-1616643395109.png

 

5 REPLIES 5
amitchandak
Super User
Super User

@Anonymous , There is something wrong with the formula, It seems like is it checking for the field in the table.

 

I tested both on March -2021 and they are working fine.

 

Can you share the formula?

 

Anonymous
Not applicable

@amitchandak  Hi, thanks for the response.  I'm using a measure with below formula. 

username = userprincipalname() 

 

even username = username() gave the same error.

@Anonymous , I actually tried the same. Hope you are creating it as a measure, not a column. The column will not work.

If it is the measure. Save the work, close, and open the power bi file again. I faced a couple of uncommon issues with March 2021 and resolved them with stop-start.

 

Still, it does not work, check the version - if it March 2021 then report an issue -https://community.powerbi.com/t5/Issues/idb-p/Issues

Anonymous
Not applicable

@amitm I'm using Dec 2020 version desktop. And this issue is when i publish the report to workspace in app.powerbi.com 

 

both functions give results in Desktop but not in services.

@Anonymous , Republish, clear browser cache and check. If do not resolve, log an issue.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.