<?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: Calculate count of occurances where a row value is immediately followed by other value in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-count-of-occurances-where-a-row-value-is-immediately/m-p/4109666#M163092</link>
    <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="19851" data-lia-user-login="Ashish_Mathur" class="lia-mention lia-mention-user"&gt;Ashish_Mathur&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thanks for sharing the pbix file, in the pbix file's date column is not in seconds, if the time difference is in seconds the outcome is not as expected&lt;/P&gt;&lt;P&gt;consider below case&lt;/P&gt;&lt;P&gt;ResponseCode previousresponsedate&lt;/P&gt;&lt;P&gt;NotFound&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 22/05/2024 11:33:25 Am&lt;/P&gt;&lt;P&gt;NotFound&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 22/05/2024 11:35:28 Am&lt;/P&gt;&lt;P&gt;Match&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 22/05/2024 11:35:35 Am&lt;/P&gt;&lt;P&gt;Match&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 22/05/2024 11:35:37 Am&lt;/P&gt;&lt;P&gt;Match&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 22/05/2024 11:35:38 Am&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expected output&lt;/P&gt;&lt;P&gt;AccessId&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;occurances&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; 206&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/P&gt;&lt;P&gt;It should consider 22/05/2024 11:35:28 Am - 2&lt;SPAN&gt;2/05/2024 11:35:35 Am&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;My data source is JSON file and after importing I changed the date column to DateTime format. When there is difference in minutes it is counting occurances properly but for the same time and difference in seconds it is not showing proper results&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have used below calculations&lt;/P&gt;&lt;P&gt;Previous check date of not found = if([ResponseCode]="match", CALCULATE (max([checkDate]), FILTER(Sheet1, [AccessId]=EARLIER([AccessId]) &amp;amp;&amp;amp; [ResponseCode]="notfound"&amp;amp;&amp;amp; [checkDate]&amp;lt;=EARLIER([checkDate]))), BLANK())&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Response code of previous check date = CALCULATE (DISTINCTCOUNT(Sheet1 [ResponseCode]), FILTER(Sheet1, Sheet1 [AccessId]=EARLIER(Sheet1[AccessId]) &amp;amp;&amp;amp;Sheet1[checkDate] &amp;gt;EARLIER (Sheet1 [Previous check date of not found]) &amp;amp;&amp;amp;Sheet1 [checkDate]&amp;lt;EARLIER (Sheet1 [checkDate]))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 20 Aug 2024 17:14:06 GMT</pubDate>
    <dc:creator>Rashmi_</dc:creator>
    <dc:date>2024-08-20T17:14:06Z</dc:date>
    <item>
      <title>Calculate count of occurances where a row value is immediately followed by other value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-count-of-occurances-where-a-row-value-is-immediately/m-p/4103548#M162833</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="19851" data-lia-user-login="Ashish_Mathur" class="lia-mention lia-mention-user"&gt;Ashish_Mathur&lt;/a&gt; / All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need a help in writing the dax.&lt;/P&gt;&lt;P&gt;A table contains AccessId, DateTime, and Response code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AccessId&amp;nbsp; &amp;nbsp; ResponseCode&amp;nbsp; &amp;nbsp; DateTime&lt;/P&gt;&lt;P&gt;201&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WeakMatch.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 16/08/2024 11:11&lt;/P&gt;&lt;P&gt;201&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NotFound&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;16/08/2024 11:13&lt;/P&gt;&lt;P&gt;201&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NoInfo&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 16/08/2024 11:14&lt;/P&gt;&lt;P&gt;201&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NotFound&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;16/08/2024 11:17&lt;/P&gt;&lt;P&gt;201&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NotFound&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;16/08/2024 11:17&lt;/P&gt;&lt;P&gt;201&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Match&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;16/08/2024 11:18&lt;/P&gt;&lt;P&gt;201&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Match&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;16/08/2024 11:28&lt;/P&gt;&lt;P&gt;202&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Match&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 16/08/2024 11:30&lt;/P&gt;&lt;P&gt;202&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NotFound&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 16/08/2024 11:31&lt;/P&gt;&lt;P&gt;203&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Match&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 16/08/2024 1133&lt;/P&gt;&lt;P&gt;203&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NotFound&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 16/08/2024 11:35&lt;/P&gt;&lt;P&gt;204&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NotFound&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 16/08/2024 1133&lt;/P&gt;&lt;P&gt;204&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WeakMatch&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 16/08/2024 11:35&lt;/P&gt;&lt;P&gt;204&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Match&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt;1&lt;/STRONG&gt;6/08/2024 1133&lt;/P&gt;&lt;P&gt;204&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NotFound&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 16/08/2024 11:35&lt;/P&gt;&lt;P&gt;204&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Match&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;16/08/2024 11:37&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expected output&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AccessId&amp;nbsp; Count&lt;/P&gt;&lt;P&gt;201&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/P&gt;&lt;P&gt;204&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Requirement is to count the number of occurances where NotFound is immediately following the Match based on the unique access id. In the above sample only 2 such conditions are satisfying. Below are the conditions matching.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;201 NotFound 16/08/2024 11:17&lt;/P&gt;&lt;P&gt;201 Match 16/08/2024 11:18&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;204 NotFound 16/08/2024 11:35&lt;/P&gt;&lt;P&gt;204 Match 16/08/2024 11:37&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please help me in writing the dax as I am trying it from past week.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Rakesh&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2024 05:08:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-count-of-occurances-where-a-row-value-is-immediately/m-p/4103548#M162833</guid>
      <dc:creator>Rakesh_Bi</dc:creator>
      <dc:date>2024-08-16T05:08:26Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate count of occurances where a row value is immediately followed by other value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-count-of-occurances-where-a-row-value-is-immediately/m-p/4103561#M162834</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;PBI file attached.&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2024 05:16:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-count-of-occurances-where-a-row-value-is-immediately/m-p/4103561#M162834</guid>
      <dc:creator>Ashish_Mathur</dc:creator>
      <dc:date>2024-08-16T05:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate count of occurances where a row value is immediately followed by other value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-count-of-occurances-where-a-row-value-is-immediately/m-p/4103797#M162842</link>
      <description>&lt;P&gt;Thanks for the quick response, I apologise, need to add another condition where it should calculate occurances within 3mins.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The dax provided is giving the expected output but whenever there are any other response codes in between NotFound and Match(ex: attached), it should ignore the count. And it should always check for the Match after immediate NotFound. In the below attachment for accessId it is counting for NotFound after Match which is incorrect.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2024 07:21:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-count-of-occurances-where-a-row-value-is-immediately/m-p/4103797#M162842</guid>
      <dc:creator>Rakesh_Bi</dc:creator>
      <dc:date>2024-08-16T07:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate count of occurances where a row value is immediately followed by other value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-count-of-occurances-where-a-row-value-is-immediately/m-p/4103805#M162843</link>
      <description>&lt;P&gt;You are welcome.&amp;nbsp; Sharing a screenshot is useless.&amp;nbsp; Share data in a format that can be pasted in an MS Excel file.&amp;nbsp; Show the expected &lt;U&gt;&lt;STRONG&gt;result very very clearly&lt;/STRONG&gt;&lt;/U&gt;.&amp;nbsp; Think through all your conditions very carefully and then post your question.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2024 07:28:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-count-of-occurances-where-a-row-value-is-immediately/m-p/4103805#M162843</guid>
      <dc:creator>Ashish_Mathur</dc:creator>
      <dc:date>2024-08-16T07:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate count of occurances where a row value is immediately followed by other value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-count-of-occurances-where-a-row-value-is-immediately/m-p/4103940#M162849</link>
      <description>&lt;P&gt;Apologise..!!&lt;/P&gt;&lt;P&gt;Attached Sample Data and Expected Output&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Requirement: need to calculate occurances where NotFound and Match are appeared together within 3mins based on unique access Id and also it should sum the respective amount.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://1drv.ms/x/s!AlZyY1FEcKn4cyNmDmiquIm4E0s" target="_blank"&gt;https://1drv.ms/x/s!AlZyY1FEcKn4cyNmDmiquIm4E0s&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2024 09:00:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-count-of-occurances-where-a-row-value-is-immediately/m-p/4103940#M162849</guid>
      <dc:creator>Rakesh_Bi</dc:creator>
      <dc:date>2024-08-16T09:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate count of occurances where a row value is immediately followed by other value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-count-of-occurances-where-a-row-value-is-immediately/m-p/4104046#M162854</link>
      <description>&lt;P&gt;203 should not appear.&amp;nbsp; PBI file attached.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2024 10:16:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-count-of-occurances-where-a-row-value-is-immediately/m-p/4104046#M162854</guid>
      <dc:creator>Ashish_Mathur</dc:creator>
      <dc:date>2024-08-16T10:16:17Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate count of occurances where a row value is immediately followed by other value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-count-of-occurances-where-a-row-value-is-immediately/m-p/4104374#M162875</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="19851" data-lia-user-login="Ashish_Mathur" class="lia-mention lia-mention-user"&gt;Ashish_Mathur&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a very similar case, in the above pbix file the responsecode from NotFound to Match to Match is also calculating but the expected output is to calculate NotFound to Match only&lt;/P&gt;&lt;P&gt;ResponseCode&amp;nbsp; count&amp;nbsp; Amount&lt;/P&gt;&lt;P&gt;201&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;130&lt;/P&gt;&lt;P&gt;204&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 200&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can you please help me on this&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2024 14:34:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-count-of-occurances-where-a-row-value-is-immediately/m-p/4104374#M162875</guid>
      <dc:creator>Rashmi_</dc:creator>
      <dc:date>2024-08-16T14:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate count of occurances where a row value is immediately followed by other value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-count-of-occurances-where-a-row-value-is-immediately/m-p/4105013#M162910</link>
      <description>&lt;P&gt;Your question is not clear.&amp;nbsp; I have added some calculated columns in the attached file.&amp;nbsp; See if that helps.&amp;nbsp; DIY.&lt;/P&gt;</description>
      <pubDate>Sat, 17 Aug 2024 02:55:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-count-of-occurances-where-a-row-value-is-immediately/m-p/4105013#M162910</guid>
      <dc:creator>Ashish_Mathur</dc:creator>
      <dc:date>2024-08-17T02:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate count of occurances where a row value is immediately followed by other value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-count-of-occurances-where-a-row-value-is-immediately/m-p/4109666#M163092</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="19851" data-lia-user-login="Ashish_Mathur" class="lia-mention lia-mention-user"&gt;Ashish_Mathur&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thanks for sharing the pbix file, in the pbix file's date column is not in seconds, if the time difference is in seconds the outcome is not as expected&lt;/P&gt;&lt;P&gt;consider below case&lt;/P&gt;&lt;P&gt;ResponseCode previousresponsedate&lt;/P&gt;&lt;P&gt;NotFound&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 22/05/2024 11:33:25 Am&lt;/P&gt;&lt;P&gt;NotFound&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 22/05/2024 11:35:28 Am&lt;/P&gt;&lt;P&gt;Match&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 22/05/2024 11:35:35 Am&lt;/P&gt;&lt;P&gt;Match&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 22/05/2024 11:35:37 Am&lt;/P&gt;&lt;P&gt;Match&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 22/05/2024 11:35:38 Am&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expected output&lt;/P&gt;&lt;P&gt;AccessId&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;occurances&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; 206&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/P&gt;&lt;P&gt;It should consider 22/05/2024 11:35:28 Am - 2&lt;SPAN&gt;2/05/2024 11:35:35 Am&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;My data source is JSON file and after importing I changed the date column to DateTime format. When there is difference in minutes it is counting occurances properly but for the same time and difference in seconds it is not showing proper results&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have used below calculations&lt;/P&gt;&lt;P&gt;Previous check date of not found = if([ResponseCode]="match", CALCULATE (max([checkDate]), FILTER(Sheet1, [AccessId]=EARLIER([AccessId]) &amp;amp;&amp;amp; [ResponseCode]="notfound"&amp;amp;&amp;amp; [checkDate]&amp;lt;=EARLIER([checkDate]))), BLANK())&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Response code of previous check date = CALCULATE (DISTINCTCOUNT(Sheet1 [ResponseCode]), FILTER(Sheet1, Sheet1 [AccessId]=EARLIER(Sheet1[AccessId]) &amp;amp;&amp;amp;Sheet1[checkDate] &amp;gt;EARLIER (Sheet1 [Previous check date of not found]) &amp;amp;&amp;amp;Sheet1 [checkDate]&amp;lt;EARLIER (Sheet1 [checkDate]))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2024 17:14:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-count-of-occurances-where-a-row-value-is-immediately/m-p/4109666#M163092</guid>
      <dc:creator>Rashmi_</dc:creator>
      <dc:date>2024-08-20T17:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate count of occurances where a row value is immediately followed by other value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-count-of-occurances-where-a-row-value-is-immediately/m-p/4110177#M163122</link>
      <description>&lt;P&gt;May be someone else can help you with this.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2024 02:04:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-count-of-occurances-where-a-row-value-is-immediately/m-p/4110177#M163122</guid>
      <dc:creator>Ashish_Mathur</dc:creator>
      <dc:date>2024-08-21T02:04:27Z</dc:date>
    </item>
  </channel>
</rss>

