<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to capitalize the first letter in this situation in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-capitalize-the-first-letter-in-this-situation/m-p/2655530#M78454</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please share the code that ended up with&lt;/P&gt;</description>
    <pubDate>Fri, 22 Jul 2022 11:40:05 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2022-07-22T11:40:05Z</dc:date>
    <item>
      <title>How to capitalize the first letter in this situation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-capitalize-the-first-letter-in-this-situation/m-p/2650603#M78120</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm new using Power BI.&amp;nbsp;I created a measure &lt;U&gt;Username = username(),&lt;/U&gt; which returned that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I changed the expression to return &lt;U&gt;User: Name&lt;/U&gt;, but the name is lower case.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;User = &lt;/SPAN&gt;&lt;SPAN&gt;CONCATENATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"User: "&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;mid&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;USERNAME&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;SPAN&gt;find&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"\"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;USERNAME&lt;/SPAN&gt;&lt;SPAN&gt;())+&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;LEN&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;USERNAME&lt;/SPAN&gt;&lt;SPAN&gt;())))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I want the name first letter upper and the rest lower, as in the example below. How can I do it?&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2022 13:43:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-capitalize-the-first-letter-in-this-situation/m-p/2650603#M78120</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-20T13:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to capitalize the first letter in this situation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-capitalize-the-first-letter-in-this-situation/m-p/2650755#M78130</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;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?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2022 14:40:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-capitalize-the-first-letter-in-this-situation/m-p/2650755#M78130</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-07-20T14:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to capitalize the first letter in this situation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-capitalize-the-first-letter-in-this-situation/m-p/2650823#M78135</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;Here is a solution that works for one word user name&amp;nbsp;&lt;A href="https://www.dropbox.com/t/gG8TzH0N6tJJPJgA" target="_blank"&gt;https://www.dropbox.com/t/gG8TzH0N6tJJPJgA&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;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 &amp;amp; "\" &amp;amp; CONCATENATEX ( T2, [@Letter] )&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 20 Jul 2022 15:15:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-capitalize-the-first-letter-in-this-situation/m-p/2650823#M78135</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-07-20T15:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to capitalize the first letter in this situation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-capitalize-the-first-letter-in-this-situation/m-p/2655512#M78452</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thank you for replying and sharing the document.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, the expression "= username()" just returns one name after "\" but in lower case (in my case).&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to transform this name into a Proper case.&lt;/P&gt;&lt;P&gt;I followed the steps you sent me, which still show lower case names, or I am missing some steps.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jul 2022 11:31:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-capitalize-the-first-letter-in-this-situation/m-p/2655512#M78452</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-22T11:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to capitalize the first letter in this situation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-capitalize-the-first-letter-in-this-situation/m-p/2655530#M78454</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please share the code that ended up with&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jul 2022 11:40:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-capitalize-the-first-letter-in-this-situation/m-p/2655530#M78454</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-07-22T11:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to capitalize the first letter in this situation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-capitalize-the-first-letter-in-this-situation/m-p/2655648#M78456</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;I tried with my USERENAME ( ) and seems to work just fine.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jul 2022 12:41:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-capitalize-the-first-letter-in-this-situation/m-p/2655648#M78456</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-07-22T12:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to capitalize the first letter in this situation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-capitalize-the-first-letter-in-this-situation/m-p/2658224#M78707</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your description, I modified your original DAX. Please try:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;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))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Output:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Jianbo Li&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 02:13:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-capitalize-the-first-letter-in-this-situation/m-p/2658224#M78707</guid>
      <dc:creator>v-jianboli-msft</dc:creator>
      <dc:date>2022-08-04T02:13:51Z</dc:date>
    </item>
  </channel>
</rss>

