Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I want to display Active Directory user name in my dashboard using label or textbox.
How to get current AD name and display in label or textbox...?
For Example my current Windows AD name would be "ccnet\joseph"
I want to display in my label as Hi "Jospeh" would be the final name to be displayed in label or textbox..
How to split only name from my current AD name...?
Solved! Go to Solution.
Here you go:
UNam =
VAR Finddelimiter =
FIND ( "@", USERPRINCIPALNAME (), 1 )
VAR DomainName =
MID ( USERPRINCIPALNAME (), 1, Finddelimiter - 1 )
VAR FindDelimiterDot =
FIND ( ".", DomainName, 1 )
VAR FirstName =
MID ( DomainName, 1, FindDelimiterDot - 1 )
VAR LastNameInitial =
MID ( DomainName, FindDelimiterDot + 1, 1 )
RETURN
UPPER ( LEFT ( FirstName, 1 ) )
& RIGHT ( FirstName, LEN ( FirstName ) - 1 ) & " "
& UPPER ( LastNameInitial )
If you have your Windows AD Name in any column then you can try to create a new calculated column like this:
Thanks for your quick response.
Is it possible to directly read from windows AD name and split it.?
Thanks for the guidance.
I want to read only specific name who has logging in to the system which means AD user name..
Now i am getting "ct1net\201980" from logging into the system.
Using this id, i want to get the name of the specific user....
How to do this...?
Ok, Try this:
UName = VAR FindSlash = FIND("\",USERNAME(),1)
return
MID(USERNAME(),FindSlash+1,LEN(USERNAME()))
Ok..You are correct to get windows user name (It is windows user account id). But, It doesn't contain any user full name.
If we want to get user name from AD, I think "sn" is the field name.
Or
we can user userprincipalname. It contains mail id along with domain.
For example, USERPRINCIPALNAME is "Joseph.Johnson@companyname.com".
To get final user name we can use this mail id and split the name of the mail id.
Final Name is " Joseph J" is the result...
Is is possible from mail id ("Joseph.Johnson@companyname.com") to get the above name "Joseph J").
I think the above step is easy way to get the name of the user..
What is you suggestion pls...?
You can try this if it solves your purpose:
Ok..Is there any DAX measure to split again from then name..?
I have "Joseph.Johnson@companyname.com" and return to Joseph.Johnson.
From this, again i want one more split and finally name would be Joseph J (I want to remove dot(.) and second name should be the initial only.
so final name is "Joseph J"...?
Here you go:
UNam =
VAR Finddelimiter =
FIND ( "@", USERPRINCIPALNAME (), 1 )
VAR DomainName =
MID ( USERPRINCIPALNAME (), 1, Finddelimiter - 1 )
VAR FindDelimiterDot =
FIND ( ".", DomainName, 1 )
VAR FirstName =
MID ( DomainName, 1, FindDelimiterDot - 1 )
VAR LastNameInitial =
MID ( DomainName, FindDelimiterDot + 1, 1 )
RETURN
UPPER ( LEFT ( FirstName, 1 ) )
& RIGHT ( FirstName, LEN ( FirstName ) - 1 ) & " "
& UPPER ( LastNameInitial )
It's perfect.
@saivina2920 , In Power query, add a new column using text after the delimiter
Text Before Delimiter and Text After Delimiter: https://youtu.be/oGY4RoPKDOE
Or use split by delimiter in power query
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 46 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |