<?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: get last online Date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-last-online-Date/m-p/3831092#M149784</link>
    <description>&lt;P&gt;Fantastic! it works&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now i have another question. How can i visual that measure with a slicer or checkbox? Want to easily swtich between "No" and "lastonline"&lt;BR /&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 11 Apr 2024 13:37:00 GMT</pubDate>
    <dc:creator>stefan321</dc:creator>
    <dc:date>2024-04-11T13:37:00Z</dc:date>
    <item>
      <title>get last online Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-last-online-Date/m-p/3830332#M149757</link>
      <description>&lt;P&gt;I have the following table:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Like to have a measure where i get the last "Online" (see Status column) date (Column Time) from each Server.&lt;/P&gt;&lt;P&gt;For example in that way:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2024 09:38:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-last-online-Date/m-p/3830332#M149757</guid>
      <dc:creator>stefan321</dc:creator>
      <dc:date>2024-04-11T09:38:56Z</dc:date>
    </item>
    <item>
      <title>Re: get last online Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-last-online-Date/m-p/3830606#M149768</link>
      <description>&lt;P&gt;Hi, &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="654861" data-lia-user-login="stefan321" class="lia-mention lia-mention-user"&gt;stefan321&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try below measure&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Var a= 
Maxx(
 filter(all(table),
 table[server]=max(table[server]) &amp;amp;&amp;amp; table[status]="online"),
 table[time]
)
Return
If(min(table[time])=a,"lastonline","No")&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 11 Apr 2024 11:11:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-last-online-Date/m-p/3830606#M149768</guid>
      <dc:creator>Dangar332</dc:creator>
      <dc:date>2024-04-11T11:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: get last online Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-last-online-Date/m-p/3831092#M149784</link>
      <description>&lt;P&gt;Fantastic! it works&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now i have another question. How can i visual that measure with a slicer or checkbox? Want to easily swtich between "No" and "lastonline"&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2024 13:37:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-last-online-Date/m-p/3831092#M149784</guid>
      <dc:creator>stefan321</dc:creator>
      <dc:date>2024-04-11T13:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: get last online Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-last-online-Date/m-p/3832835#M149877</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="654861" data-lia-user-login="stefan321" class="lia-mention lia-mention-user"&gt;stefan321&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Thanks for&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="569583" data-lia-user-login="Dangar332" class="lia-mention lia-mention-user"&gt;Dangar332&lt;/a&gt;&amp;nbsp; reply.&lt;BR /&gt;Here's my alternative approach and additions&lt;BR /&gt;Create a meaure&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;LastOnline = 
VAR _MaxTime = 
CALCULATE(
    MAX('Table'[Time]),
    FILTER(
        ALLEXCEPT(
        'Table',
        'Table'[Server]
    ),
        'Table'[Status] = "Online"
    )
)
RETURN
IF(
    SELECTEDVALUE('Table'[Time]) = _MaxTime,
    "lastOnline",
    "No"
)&lt;/LI-CODE&gt;
&lt;P&gt;Output&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Next up is how to filter using meaure&lt;BR /&gt;Create a table2&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table 2 = 
SUMMARIZE(
    'Table',
    'Table'[Time],
    "Type",'Table'[LastOnline]
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;BR /&gt;Use type as slicer value&lt;BR /&gt;Create another meaure&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Slicer = 
IF(
    'Table'[LastOnline] = SELECTEDVALUE('Table 2'[Type]),
    1,
    IF(
        SELECTEDVALUE('Table 2'[Type]) = BLANK(),
        1,
        0
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;Use the meaure as filter of this visual and set it "is 1"&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Final output&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Albert He&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post &lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider&lt;EM&gt;&lt;STRONG&gt; Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2024 07:14:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-last-online-Date/m-p/3832835#M149877</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-12T07:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: get last online Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-last-online-Date/m-p/3834078#M149906</link>
      <description>&lt;P&gt;Hi Albert&lt;/P&gt;&lt;P&gt;ist works! thanks a ton! really a nice solution &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;i have just a small issue: Sometimes i have The same timestamp for a Server whith multiple Instances. So for example:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Unfortunately your solution shows in that case all Status entries, but i want to have Online only. Do you have a easy solution for that? Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2024 12:58:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-last-online-Date/m-p/3834078#M149906</guid>
      <dc:creator>stefan321</dc:creator>
      <dc:date>2024-04-12T12:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: get last online Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-last-online-Date/m-p/3835641#M149974</link>
      <description>&lt;P&gt;hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="654861" data-lia-user-login="stefan321" class="lia-mention lia-mention-user"&gt;stefan321&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try below measure&lt;/P&gt;
&lt;P&gt;for lastonline&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
var a= MAXX(
          FILTER(
            ALL('Table'),
            'Table'[server]=MAX('Table'[server]) &amp;amp;&amp;amp; 'Table'[status]="online"),
            'Table'[time]
        )
Return
If(min('table'[time])=a&amp;amp;&amp;amp; MIN('Table'[status])="online","lastonline","No")&lt;/LI-CODE&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;use below measure for visual filter&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;slicer = 
IF(
    [Measure]=SELECTEDVALUE('status'[Value]),
    1,
    IF(SELECTEDVALUE('status'[Value])=BLANK(),1,0))&lt;/LI-CODE&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;make a table of&amp;nbsp;&amp;nbsp;'status'&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;status = {("lastOnline"),("No")}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;you can download file from below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Apr 2024 16:47:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-last-online-Date/m-p/3835641#M149974</guid>
      <dc:creator>Dangar332</dc:creator>
      <dc:date>2024-04-13T16:47:33Z</dc:date>
    </item>
  </channel>
</rss>

