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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Not applicable

username() return NULL on publish service

Hi everyone:


I have a problem showing user in power bi publish service. 

I create an measures with DAX sencence:


UsuarioP = USERNAME()


usuarioFilter = LEFT(USERNAME();SEARCH("@";USERNAME())-1)


That measures in web desktop shows data OK:


UsuarioP show "user@....."

usuarioFilter show "user"


But after publish to the web, both shows NULL values.


Thank you!

Resolver IV
Resolver IV

@Anonymous hello, it happens when you publish it and use the Public Link, is the case?


when you use the Link inside the service with an user, aways will appear for you.


Not applicable



Yes @henriquesilveir, when i use web editor, it`s ok. But when i use public link, becomes blank.


Thank you.

You cannot do nothing.. Always in public link will apper (null).

And in tje service will show the user.
Not applicable



Ok, thank you.


I use that for filter (like a slicer) dashboards. How can i filter in public link?


Than you.

Hi @Anonymous You can duplicate some of your reports and apply a report filter. 


Not applicable



Thank you @henriquesilveir

Helpful resources

Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors