<?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: Need some help with methodology - calculate time in status of ordered list in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/Need-some-help-with-methodology-calculate-time-in-status-of/m-p/1470382#M16503</link>
    <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="52518" data-lia-user-login="Fowmy" class="lia-mention lia-mention-user"&gt;Fowmy&lt;/a&gt;&amp;nbsp; &amp;nbsp;I am almost there and appreciate your reply very much.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have used your suggestion as follows ( changed the DAY toMINUTE since test date is minimal and&amp;nbsp;&lt;/P&gt;&lt;P&gt;mostly created same day.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Time In Status = 
VAR _STATUS = SELECTEDVALUE(statusHistory[Status])
VAR _START = MIN(statusHistory[Modified].[Date])
VAR _END = MINX(FILTER(ALL(statusHistory), statusHistory[Status]&amp;gt; _STATUS ),statusHistory[Modified].[Date] )
RETURN
DATEDIFF( _START , _END ,MINUTE ) &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Below is the output and source data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I still have research to do but,&amp;nbsp; &amp;nbsp;if I understand correctly, Do I need to add something to filter the start variable to the status grouping since all these are looking at the earliest regardless of status?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And the last thing I wondered is, if since what I want is a total of time in the status,&amp;nbsp; would I be better served doing this as a group by&amp;nbsp; in power query?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again for the help!&amp;nbsp; I will mark this answered since I was looking for guidance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 02 Nov 2020 23:32:00 GMT</pubDate>
    <dc:creator>IbisRipley</dc:creator>
    <dc:date>2020-11-02T23:32:00Z</dc:date>
    <item>
      <title>Need some help with methodology - calculate time in status of ordered list</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Need-some-help-with-methodology-calculate-time-in-status-of/m-p/1466845#M16473</link>
      <description>&lt;P&gt;I think this might be a simple question for many.&amp;nbsp; I have a table MyTable( status (INT) , Modified(DateTime) )&amp;nbsp; The statuses are ordered, but can be duplicated with multiple dates.&lt;/P&gt;&lt;P&gt;I am looking to show how long they are in each state, with the end goal to be aggrigating and charting Average time in a given status.&amp;nbsp; Can anyone point me in the right direction on methodology?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Input table&lt;/P&gt;&lt;P&gt;Status&amp;nbsp; &amp;nbsp; &amp;nbsp;Modified&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1/1/2020&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1/3/2020&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1/5/2020&lt;/P&gt;&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1/6/2020&lt;/P&gt;&lt;P&gt;4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1/7/2020&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Desired result&lt;/P&gt;&lt;P&gt;Status&amp;nbsp; &amp;nbsp; &amp;nbsp;TimeInStatus&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2 (days)&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&lt;/P&gt;&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/P&gt;</description>
      <pubDate>Sat, 31 Oct 2020 02:05:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Need-some-help-with-methodology-calculate-time-in-status-of/m-p/1466845#M16473</guid>
      <dc:creator>IbisRipley</dc:creator>
      <dc:date>2020-10-31T02:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help with methodology - calculate time in status of ordered list</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Need-some-help-with-methodology-calculate-time-in-status-of/m-p/1467386#M16475</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="116730" data-lia-user-login="IbisRipley" class="lia-mention lia-mention-user"&gt;IbisRipley&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Add this as a measure and check if it works for you:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Time In Status = 
VAR _STATUS = SELECTEDVALUE(MyTable[Status   ])
VAR _START = MIN(MyTable[ Modified])
VAR _END = MINX(FILTER(ALL(MyTable), MyTable[Status   ] &amp;gt; _STATUS ),MyTable[ Modified] )

RETURN
DATEDIFF( _START , _END ,DAY ) &lt;/LI-CODE&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;________________________&lt;/P&gt;&lt;P&gt;If my answer was helpful, please consider &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&lt;I&gt; to help the other members find it&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Click on the &lt;STRONG&gt;Thumbs-Up icon &lt;/STRONG&gt;if you like this reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/channel/UCKwBEguA8IlBubIobaOormg?sub_confirmation=1" target="_blank"&gt;&lt;FONT color="blue"&gt;YouTube&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp; &lt;A href="https://linkedin.com/in/fowmy" target="_blank"&gt;&lt;FONT color="blue"&gt;LinkedIn&lt;/FONT&gt;&lt;/A&gt;&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>Sat, 31 Oct 2020 19:54:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Need-some-help-with-methodology-calculate-time-in-status-of/m-p/1467386#M16475</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2020-10-31T19:54:54Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help with methodology - calculate time in status of ordered list</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Need-some-help-with-methodology-calculate-time-in-status-of/m-p/1470382#M16503</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="52518" data-lia-user-login="Fowmy" class="lia-mention lia-mention-user"&gt;Fowmy&lt;/a&gt;&amp;nbsp; &amp;nbsp;I am almost there and appreciate your reply very much.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have used your suggestion as follows ( changed the DAY toMINUTE since test date is minimal and&amp;nbsp;&lt;/P&gt;&lt;P&gt;mostly created same day.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Time In Status = 
VAR _STATUS = SELECTEDVALUE(statusHistory[Status])
VAR _START = MIN(statusHistory[Modified].[Date])
VAR _END = MINX(FILTER(ALL(statusHistory), statusHistory[Status]&amp;gt; _STATUS ),statusHistory[Modified].[Date] )
RETURN
DATEDIFF( _START , _END ,MINUTE ) &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Below is the output and source data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I still have research to do but,&amp;nbsp; &amp;nbsp;if I understand correctly, Do I need to add something to filter the start variable to the status grouping since all these are looking at the earliest regardless of status?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And the last thing I wondered is, if since what I want is a total of time in the status,&amp;nbsp; would I be better served doing this as a group by&amp;nbsp; in power query?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again for the help!&amp;nbsp; I will mark this answered since I was looking for guidance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 23:32:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Need-some-help-with-methodology-calculate-time-in-status-of/m-p/1470382#M16503</guid>
      <dc:creator>IbisRipley</dc:creator>
      <dc:date>2020-11-02T23:32:00Z</dc:date>
    </item>
  </channel>
</rss>

