Showing results for 
Search instead for 
Did you mean: 

USERNAME() function doesn't work in dashboards with streaming data

I have a streaming dataset created in PowerBI service.
In this dataset I have some records assigned to specific email address.

I'm using USERNAME() function to get current user and return pre-filtered result from dataset.
Everything works perfect in PowerBI Desktop and PowerBI Service until I use dashboards.

I need dashboards to update the visuals immediately after new data is available because automatical refresh doesn't work for reports.

New dasbhoard looks good and returns information correctly.
But as soon as new record(s) added to the streaming dataset USERNAME() function stop working returns nothing.

And in all related tiles (measures) I see just BLANK. I have a separate tile with current user funciton result, but it becomes empty.

Same time, I don't see any issues in the source report. It is working fine but requires manual data refresh.
And dasboard is not working, refresh doesn't help, to see new actual results I have to readd tiles from the source report, but it is not an option of course.

My questions is how to fix the issue with USERNAME() function (same issue for USERPRINCIPALNAME() ) which doesn't work in dashboards based on streaming dataset when new rows added.

Status: Accepted
Community Support Team

Hi @ivolk,


Push and streaming datasets aren't available in the Power BI Desktop. How did you use the function USERNAME()?  Please refer to: service-real-time-streaming. Could you please provide more info?

1. What's the data source exactly? Where is it from?

2. What's the formula?


Best Regards,



Hi Dale,


I have created a Streaming dataset directly in PowerBI portal. It doesn't matter which and how many columns it has.

Then I connected to this dataset from PowerBI Desktop directly (I used PowerBI as source).


After that it is possible to add measures to the report.

I created a measure returning USERNAME() and put it on the page vith "Card" visual.


After publishing I created new dashboard and addeded new tile to see live data.

Dashboard is working fine until new records added to the dataset.


After adding any rows to the dataset tile with USERNAME() measure returns nothing.




Community Support Team

Hi @ivolk,


This is because there is something wrong with the function USERNAME(). It returns an ID. I have reported this issue. I will update here in time.



Best Regards,


Established Member
Status changed to: Accepted