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
Hi guys,
I'm new using Power BI. I created a measure Username = username(), which returned that.
Then I changed the expression to return User: Name, but the name is lower case.
I want the name first letter upper and the rest lower, as in the example below. How can I do it?
Thanks
Solved! Go to Solution.
Hi @nmcp22 ,
According to your description, I modified your original DAX. Please try:
User =
var _name = mid ( USERNAME (), find ( "\" , USERNAME ())+ 1 ,LEN ( USERNAME ()))
var _U = UPPER(LEFT(_name,1))
var _L = LOWER(RIGHT(_name,LEN(_name)-1))
return CONCATENATE("User:",CONCATENATE(_U,_L))
Output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@nmcp22
Here is a solution that works for one word user name https://www.dropbox.com/t/gG8TzH0N6tJJPJgA
Username =
VAR CurrentUser = SELECTEDVALUE ( UserNames[USER] )
VAR String = SUBSTITUTE ( CurrentUser, "\", "|" )
VAR String1 = "User"
VAR String2 = PATHITEM ( String, 2 )
VAR Length = LEN ( String2 )
VAR T1 = GENERATESERIES ( 1, Length, 1 )
VAR T2 =
ADDCOLUMNS (
T1,
"@Letter",
VAR Letter = MID ( String2, [Value], 1 )
RETURN
IF ( [Value] = 1, UPPER ( Letter ), Letter )
)
RETURN
String1 & "\" & CONCATENATEX ( T2, [@Letter] )
Hi @nmcp22
The username is usually one word. Just to confirm because the solution could be different, is there any possibility to be one than one word?
Hi @tamerj1,
Thank you for replying and sharing the document.
Yes, the expression "= username()" just returns one name after "\" but in lower case (in my case).
I am trying to transform this name into a Proper case.
I followed the steps you sent me, which still show lower case names, or I am missing some steps.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 20 | |
| 11 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 31 | |
| 29 | |
| 21 | |
| 12 | |
| 12 |