Table of contents
TOC
Collapse the table of content
Expand the table of content

USERNAME Function (DAX)

Owen Duncan|Last Updated: 5/22/2018

Returns the domain name and username from the credentials given to the system at connection time

Syntax

USERNAME()  

Parameters

Return Value

The username from the credentials given to the system at connection time

Example

The following code verifies if the user login is part of the UsersTable.

=IF(CONTAINS(UsersTable,UsersTable[login], USERNAME()), "Allowed", BLANK())  
© 2018 Microsoft