• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User


  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to filter data based on USERNAME()


New Member
I am building a Power BI report that will contain results for multiple agents across the centre. I would like to automatically filter all data shown based on the network credentials of the person opening the report (i.e., when John Smith opens the report, he will only see data for John Smith).

I know there is a DAX function called USERNAME() that will give me the LAN ID of the person accessing the report. And I can easily incorporate the LAN ID into the dataset. I'm just struggling to figure out how to get the filtering to work.

Please note that end users will be accessing the report via Power BI desktop (we don't currently use a Power BI server).

Sample Excel file included. Any help would be appreciated.


  • Sample Excel.xlsx
    16.5 KB · Views: 1
Last edited:
If they access via PowerBI desktop. That's not going to hide data from users.

They will be able to see everything that's in the model.

I'd recommend alternate approach. Such as leveraging Power Automate and Power Apps to serve data to the user.