<?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: Dynamic Message using the system username in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Message-using-the-system-username/m-p/2678807#M80130</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Greeting&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp; USERNAME ( )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;but in most cases usernames are not the perfect shape therefore some extra editing (using dax) might be required&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 03 Aug 2022 13:42:53 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2022-08-03T13:42:53Z</dc:date>
    <item>
      <title>Dynamic Message using the system username</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Message-using-the-system-username/m-p/2678748#M80127</link>
      <description>&lt;P&gt;Hi there!&amp;nbsp; i have this code which consists of making a greeting to the person who enter the dashboard,&amp;nbsp;how do I get the system username printed on the message? like.. if the system is called "John Computer" I want the message to appear "Good afternoon John Computer,&amp;nbsp; is that's possible?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Welcome Text = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPA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PAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Hour&lt;/SPAN&gt;&lt;SPAN&gt; &amp;gt;= &lt;/SPAN&gt;&lt;SPAN&gt;12&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;&amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;Hour&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt; &lt;/SPAN&gt;&lt;SPAN&gt;18&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"Good Afternoon"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Hour&lt;/SPAN&gt;&lt;SPAN&gt; &amp;gt;= &lt;/SPAN&gt;&lt;SPAN&gt;18&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;&amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;Hour&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt; &lt;/SPAN&gt;&lt;SPAN&gt;24&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"Good Evening"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Greeting&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;" Murilo"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 03 Aug 2022 13:18:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Message-using-the-system-username/m-p/2678748#M80127</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-03T13:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Message using the system username</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Message-using-the-system-username/m-p/2678807#M80130</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Greeting&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp; USERNAME ( )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;but in most cases usernames are not the perfect shape therefore some extra editing (using dax) might be required&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 03 Aug 2022 13:42:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Message-using-the-system-username/m-p/2678807#M80130</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-08-03T13:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Message using the system username</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Message-using-the-system-username/m-p/2678812#M80131</link>
      <description>&lt;P&gt;lol it was that simple, thanks! one other question, this is the username of the system but there's a way to just pull the Name? the system name might&amp;nbsp; be John Computer but in the account is just called John, there's a way to just get only the computer profile name?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 14:26:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Message-using-the-system-username/m-p/2678812#M80131</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-03T14:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Message using the system username</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Message-using-the-system-username/m-p/2678930#M80141</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We cannot pull the computer name but we can edit the username and modify it. If you are interested give me some examples of what are the actual usernames and would you exoect to see as a result.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 14:27:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Message-using-the-system-username/m-p/2678930#M80141</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-08-03T14:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Message using the system username</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Message-using-the-system-username/m-p/2681568#M80319</link>
      <description>&lt;P&gt;Ok! So.. the actual usernames are things like /COMPANYNET/username and i just want to show the username..&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example :&lt;/P&gt;&lt;P&gt;Actual : Good Morning /CompanyNET/AnneAlavarci/&lt;/P&gt;&lt;P&gt;What i need : Good Morning AnneAlavarci&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I couldnt find much information about these type of string manipulation in dax&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 11:47:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Message-using-the-system-username/m-p/2681568#M80319</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-04T11:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Message using the system username</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Message-using-the-system-username/m-p/2681624#M80320</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;You can do&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Greeting = 
VAR Greeting = "Good Morning"
VAR FullName = "/CompanyNET/AnneAlavarci/" --Use USERNAME ( ) Function
VAR Items = SUBSTITUTE ( FullName, "/", "|" )
VAR NameOnly = PATHITEM ( Items, 3 )
RETURN
    Greeting &amp;amp; " " &amp;amp; NameOnly&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, if both first and last names are proper case (first letter is capital) maybe there is a chance that we can split them. I will also look into that but for now I have to leave for some urgent business. Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 12:05:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Message-using-the-system-username/m-p/2681624#M80320</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-08-04T12:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Message using the system username</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Message-using-the-system-username/m-p/2681857#M80335</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;Hello again. You can refer to the sample file for a method to split first and last names&amp;nbsp;&lt;A href="https://we.tl/t-gkFZ77JFsJ" target="_blank"&gt;https://we.tl/t-gkFZ77JFsJ&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Greeting = 
VAR Greeting = "Good Morning" -- You can refer to a measure with switch statement based on NOW ( ) Function 
VAR FullName = "/CompanyNET/AnneAlavarci/" --Use USERNAME ( ) Function
VAR Items = SUBSTITUTE ( FullName, "/", "|" )
VAR NameOnly = PATHITEM ( Items, 3 )
VAR T3 = VALUES ( 'Capital Letters'[Letter] )
VAR T4 = ADDCOLUMNS ( T3, "@Position", FIND ( [Letter], NameOnly, 2, 0 ) )
VAR T5 = FILTER ( T4, [@Position] &amp;gt; 1 )
VAR Position = MAXX ( T5, [@Position] )
VAR Replacement = " " &amp;amp; MAXX ( T5, [Letter] )
VAR NewName = REPLACE ( NameOnly, Position, 1, Replacement )
RETURN
    Greeting &amp;amp; " " &amp;amp; NewName&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 04 Aug 2022 13:41:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Message-using-the-system-username/m-p/2681857#M80335</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-08-04T13:41:10Z</dc:date>
    </item>
  </channel>
</rss>

