Forum Discussion
How to split specific character from Widows AD Name
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...?
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 )
11 Replies
- amitchandak
Super User
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
- PC2790
Community Champion
If you have your Windows AD Name in any column then you can try to create a new calculated column like this:
UName = RIGHT(Table[Column1],FIND("\",Table[Column1],1,LEN(Table[Column1])))Result will be like:- saivina2920
Post Prodigy
Thanks for your quick response.
Is it possible to directly read from windows AD name and split it.?