<?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: Calculating time difference... in Desktop</title>
    <link>https://community.fabric.microsoft.com/t5/Desktop/Calculating-time-difference/m-p/1544785#M632575</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;，&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it's not convinient to provide your data,would you pls make a more detailed sample data for me to test?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or you may try use below measure :&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure=SUMX(ALLSELECTED('TABLE'[Client Azure DevOps]),'Table'[Column 2])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Kelly&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution!&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 11 Dec 2020 07:48:43 GMT</pubDate>
    <dc:creator>v-kelly-msft</dc:creator>
    <dc:date>2020-12-11T07:48:43Z</dc:date>
    <item>
      <title>Calculating time difference...</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Calculating-time-difference/m-p/1528385#M628335</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a dataset with the history of changes to items. Some of those items have been 'tagged' as blocked on certain dates.&lt;/P&gt;&lt;P&gt;Whilst I've managed to calculate the total time an item has spent blocked when the tag is removed, I'm struggling with how do I calculate &lt;STRONG&gt;how long an item that is currently tagged as blocked has been blocked for.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is an example from the dataset:&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;It has been tagged as blocked since 30/11/2020 08:05:31 (so roughly 2 days) - just wondering what my column/measure should be to work this out? Above my Power BI knowledge level &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 10:28:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Calculating-time-difference/m-p/1528385#M628335</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-12-02T10:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating time difference...</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Calculating-time-difference/m-p/1528587#M628373</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , Create a new column like and try &lt;/P&gt;
&lt;P&gt;new column = &lt;BR /&gt;datediff(maxx(filter(table, [workitemid] = earlier([workitemid]) &amp;amp;&amp;amp; [index] = earlier([index]) -1 &amp;amp;&amp;amp; [Tagname] =earlier([Tagname]) &amp;amp;&amp;amp; [Tagname] ="Blocked"),[ChangedDate]),[ChangedDate] ,minute)/60*24&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 11:32:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Calculating-time-difference/m-p/1528587#M628373</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-12-02T11:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating time difference...</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Calculating-time-difference/m-p/1528831#M628442</link>
      <description>&lt;P&gt;Thanks, that isn't quite there yet &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Entered it in and seeing the following:&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;I believe the "correct" number should be 2.23, based on&amp;nbsp;&lt;SPAN&gt;&lt;EM&gt;NOW()-WorkItemsBlocked[ChangedDate]&lt;/EM&gt; but using the 08:05 timestamp (as this was the first time in the current collection of 'blocked' tags it was blocked)...&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 13:37:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Calculating-time-difference/m-p/1528831#M628442</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-12-02T13:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating time difference...</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Calculating-time-difference/m-p/1535574#M630171</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First split column "ChangedDate" into 3 columns as below:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then create a column as below:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column 2 = 
var _datetime=IF('Table'[Status]="Blocked",CALCULATE(MAX('Table'[datetime]),FILTER('Table','Table'[WorkItemId]=EARLIER('Table'[WorkItemId])&amp;amp;&amp;amp;'Table'[Status]="Blocked"&amp;amp;&amp;amp;'Table'[Index]&amp;lt;EARLIER('Table'[Index]))),BLANK())
var _time=CALCULATE(MAX('Table'[Time]),FILTER('Table','Table'[datetime]=_datetime))
var _date=CALCULATE(MAX('Table'[ChangedDate.1]),FILTER('Table','Table'[datetime]=_datetime))
var _previousstatus=CALCULATE(MAX('Table'[Status]),FILTER('Table','Table'[Index]=EARLIER('Table'[Index])-1&amp;amp;&amp;amp;'Table'[WorkItemId]=EARLIER('Table'[WorkItemId])))
Return
IF('Table'[Status]="Blocked"&amp;amp;&amp;amp;_date&amp;lt;&amp;gt;BLANK()&amp;amp;&amp;amp;_previousstatus="Blocked",
IF(DATEDIFF(_date,'Table'[ChangedDate.1],DAY)=0,
DATEDIFF(_time,'Table'[Time],HOUR)/24,
DATEDIFF(_date,'Table'[ChangedDate.1],DAY)-(24-(HOUR('Table'[Time])+MINUTE('Table'[Time])/60))/24)
)
&lt;/LI-CODE&gt;
&lt;P&gt;And you will see:&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;For the related .pbix file,pls see attached.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Kelly&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution!&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2020 06:19:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Calculating-time-difference/m-p/1535574#M630171</guid>
      <dc:creator>v-kelly-msft</dc:creator>
      <dc:date>2020-12-07T06:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating time difference...</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Calculating-time-difference/m-p/1536920#M630562</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="194507" data-lia-user-login="v-kelly-msft" class="lia-mention lia-mention-user"&gt;v-kelly-msft&lt;/a&gt;&amp;nbsp;- that has gotten me there &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Only issue is my bar chart still wants to sum the above values:&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;Any way around this?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2020 17:22:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Calculating-time-difference/m-p/1536920#M630562</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-12-07T17:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating time difference...</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Calculating-time-difference/m-p/1537548#M630740</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;Create a measure as below:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = SUMX(ALL('Table'),'Table'[Column 2])&lt;/LI-CODE&gt;
&lt;P&gt;And you will see:&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;BR /&gt;Kelly&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution!&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 01:47:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Calculating-time-difference/m-p/1537548#M630740</guid>
      <dc:creator>v-kelly-msft</dc:creator>
      <dc:date>2020-12-08T01:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating time difference...</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Calculating-time-difference/m-p/1538389#M630970</link>
      <description>&lt;P&gt;Thanks - unfortunately that doesn't seem to work, and is summing for all the items in that table (there are multiple different work item ID's)...any ideas?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 10:00:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Calculating-time-difference/m-p/1538389#M630970</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-12-08T10:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating time difference...</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Calculating-time-difference/m-p/1539585#M631263</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;Could you pls upload your .pbix file to onedrive business and share the link with us?Remember to remove the confidential information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Kelly&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution!&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2020 00:19:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Calculating-time-difference/m-p/1539585#M631263</guid>
      <dc:creator>v-kelly-msft</dc:creator>
      <dc:date>2020-12-09T00:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating time difference...</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Calculating-time-difference/m-p/1544785#M632575</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;If it's not convinient to provide your data,would you pls make a more detailed sample data for me to test?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or you may try use below measure :&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure=SUMX(ALLSELECTED('TABLE'[Client Azure DevOps]),'Table'[Column 2])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Kelly&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution!&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2020 07:48:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Calculating-time-difference/m-p/1544785#M632575</guid>
      <dc:creator>v-kelly-msft</dc:creator>
      <dc:date>2020-12-11T07:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating time difference...</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Calculating-time-difference/m-p/1546005#M632887</link>
      <description>&lt;P&gt;Sorry for the delay, &lt;A href="https://drive.google.com/file/d/11tTWzJoGFOMhSjNKWwSvNCzhwOLRQN_Q/view?usp=sharing" target="_self"&gt;here is a link&lt;/A&gt; to a file with dummy data. The 'write a blog post' item has been blocked since 27th November but has had updates to it since (but still remains blocked). Thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2020 16:46:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Calculating-time-difference/m-p/1546005#M632887</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-12-11T16:46:30Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating time difference...</title>
      <link>https://community.fabric.microsoft.com/t5/Desktop/Calculating-time-difference/m-p/1550087#M633954</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;，&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I cant match the data with your expected output,but checking the previous data,with the measure below,it works fine:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = SUMX(VALUES('Table'[WorkItemId]),SUM('Table'[Column 2]))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Would you pls explain more about how to get the result you need&amp;nbsp; based on your .pbix file?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Kelly&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution!&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 01:20:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Desktop/Calculating-time-difference/m-p/1550087#M633954</guid>
      <dc:creator>v-kelly-msft</dc:creator>
      <dc:date>2020-12-15T01:20:02Z</dc:date>
    </item>
  </channel>
</rss>

