<?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 Get Duration from Logged In and Logged Out data per User in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-Duration-from-Logged-In-and-Logged-Out-data-per-User/m-p/2965588#M98961</link>
    <description>&lt;P&gt;I am looking to find the total time users are logged into our system. The way the data is exported currently does not show how long they were logged in. I don't know the best way to do this within Power BI.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;This is a snippet of what the CSV data looks like. I am able to export a table of Logged In and Logged Out seperately but I thought this would be better.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was thinking the equation to do it would look like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If Action = "RemoteLoggedIn" (some how store UserName)&lt;/P&gt;&lt;P&gt;Then find the next instance of "RemoteLoggedOut" and UserName1 = UserName2&lt;/P&gt;&lt;P&gt;Then Date2 - Date1 = Duration&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know how to do this within PowerBI or what the best way to implement this. It seems easier in a different language, especially with loops and storing of variables. But I am new to PowerBI and I am struggling to figure this one out.&lt;/P&gt;</description>
    <pubDate>Tue, 13 Dec 2022 14:29:03 GMT</pubDate>
    <dc:creator>NCW</dc:creator>
    <dc:date>2022-12-13T14:29:03Z</dc:date>
    <item>
      <title>Get Duration from Logged In and Logged Out data per User</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-Duration-from-Logged-In-and-Logged-Out-data-per-User/m-p/2965588#M98961</link>
      <description>&lt;P&gt;I am looking to find the total time users are logged into our system. The way the data is exported currently does not show how long they were logged in. I don't know the best way to do this within Power BI.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;This is a snippet of what the CSV data looks like. I am able to export a table of Logged In and Logged Out seperately but I thought this would be better.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was thinking the equation to do it would look like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If Action = "RemoteLoggedIn" (some how store UserName)&lt;/P&gt;&lt;P&gt;Then find the next instance of "RemoteLoggedOut" and UserName1 = UserName2&lt;/P&gt;&lt;P&gt;Then Date2 - Date1 = Duration&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know how to do this within PowerBI or what the best way to implement this. It seems easier in a different language, especially with loops and storing of variables. But I am new to PowerBI and I am struggling to figure this one out.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 14:29:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-Duration-from-Logged-In-and-Logged-Out-data-per-User/m-p/2965588#M98961</guid>
      <dc:creator>NCW</dc:creator>
      <dc:date>2022-12-13T14:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: Get Duration from Logged In and Logged Out data per User</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-Duration-from-Logged-In-and-Logged-Out-data-per-User/m-p/2966923#M99053</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="485617" data-lia-user-login="NCW" class="lia-mention lia-mention-user"&gt;NCW&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;a new column = if([Action] = "RemoteLoggedIn",&lt;/P&gt;
&lt;P&gt;datediff( [Date], Minx(filter(Table, [user Name] = earlier([User Name]) &amp;amp;&amp;amp; [Action] ="RemoteLoggedOut" &amp;amp;&amp;amp; [Date] &amp;gt; Earlier([Date]) ) ,[Date]), Minute) , Blank())&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 03:23:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-Duration-from-Logged-In-and-Logged-Out-data-per-User/m-p/2966923#M99053</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-12-14T03:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: Get Duration from Logged In and Logged Out data per User</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-Duration-from-Logged-In-and-Logged-Out-data-per-User/m-p/2968312#M99114</link>
      <description>&lt;P&gt;This works great. Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 14:42:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-Duration-from-Logged-In-and-Logged-Out-data-per-User/m-p/2968312#M99114</guid>
      <dc:creator>NCW</dc:creator>
      <dc:date>2022-12-14T14:42:20Z</dc:date>
    </item>
  </channel>
</rss>

