<?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: Count Number of Rows Based on Filter From Current Row in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Number-of-Rows-Based-on-Filter-From-Current-Row/m-p/1728568#M35781</link>
    <description>&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately this isn't what I'm looking for. Yours seems to only show if its still open. What I'm looking for is a count of how many INC were opened but not closed when the INC on that row was closed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In your table, for example, line 2 was closed the 11th. From that we have&lt;/P&gt;&lt;P&gt;Line 1 as it was closed on the 4th so counts as 0&lt;/P&gt;&lt;P&gt;Obviously we exclude line 2&lt;/P&gt;&lt;P&gt;Line 3 was opened the 9th (before the 11th) and not yet closed so that counts as 1&lt;/P&gt;&lt;P&gt;Line 4 was opened the 10th (before the 11th) and closed the 16th (after the 11th) and was thus still opened when line 2 was closed so it counts as 1&lt;/P&gt;&lt;P&gt;Line 5, 6 and 7 were alsc closed the 11th so they count as 0&lt;/P&gt;&lt;P&gt;Line 8 was opened the 12th so after the line 2 was closed so counts as 0&lt;/P&gt;&lt;P&gt;Line 9 was opened the 15th so after the line 2 was closed so counts as 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I would want is to have the value 2 in the new column at the end of line 2 which is the sum from end line listed above. And to repeat this process for each line.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this has helped clarify my request&lt;/P&gt;</description>
    <pubDate>Wed, 17 Mar 2021 20:21:04 GMT</pubDate>
    <dc:creator>lagacem</dc:creator>
    <dc:date>2021-03-17T20:21:04Z</dc:date>
    <item>
      <title>Count Number of Rows Based on Filter From Current Row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Number-of-Rows-Based-on-Filter-From-Current-Row/m-p/1727837#M35763</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking for help on this as I can get it to work in Excel but am having a hard time figuring it out in Power BI. What I'm trying to accomplish is to have at the end of each row, a count of how many INC were still open at the time on resolution. So basically where the opened_at_value of other rows &amp;lt; resolved_at_value this row AND resolved_at_value of other rows &amp;gt;resolved_at_value of this row&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;In Excel I can simply get it done with COUNTIFS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;I've tried using COUNTX, COUNTROWS with FILTER but it only returns the calculation on that specific row.&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Wed, 17 Mar 2021 13:45:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Number-of-Rows-Based-on-Filter-From-Current-Row/m-p/1727837#M35763</guid>
      <dc:creator>lagacem</dc:creator>
      <dc:date>2021-03-17T13:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: Count Number of Rows Based on Filter From Current Row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Number-of-Rows-Based-on-Filter-From-Current-Row/m-p/1728236#M35771</link>
      <description>&lt;P class="lia-align-left"&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="282509" data-lia-user-login="lagacem" class="lia-mention lia-mention-user"&gt;lagacem&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-left"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-left"&gt;Hope this solves you're problem. Excel and Power BI are very similar, I've used if condition as a calculated column.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Still_Open = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IF ( Community_Sol[CLOSE_DATE] &amp;gt; Community_Sol[OPEN_DATE] , 0 , IF ( Community_Sol[CLOSE_DATE] = Community_Sol[OPEN_DATE] , 0 , 1 ) )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P class="lia-align-left"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-left"&gt;&lt;img /&gt;&lt;/P&gt;&lt;P class="lia-align-left"&gt;You can also use "Earlier" function for the same.&lt;/P&gt;&lt;P class="lia-align-left"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-left"&gt;Thanks,&lt;BR /&gt;Ankit&lt;BR /&gt;&lt;A href="http://www.linkedin.com/in/ankit-kukreja1904" target="_blank"&gt;www.linkedin.com/in/ankit-kukreja1904&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 16:31:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Number-of-Rows-Based-on-Filter-From-Current-Row/m-p/1728236#M35771</guid>
      <dc:creator>AnkitKukreja</dc:creator>
      <dc:date>2021-03-17T16:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: Count Number of Rows Based on Filter From Current Row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Number-of-Rows-Based-on-Filter-From-Current-Row/m-p/1728568#M35781</link>
      <description>&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately this isn't what I'm looking for. Yours seems to only show if its still open. What I'm looking for is a count of how many INC were opened but not closed when the INC on that row was closed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In your table, for example, line 2 was closed the 11th. From that we have&lt;/P&gt;&lt;P&gt;Line 1 as it was closed on the 4th so counts as 0&lt;/P&gt;&lt;P&gt;Obviously we exclude line 2&lt;/P&gt;&lt;P&gt;Line 3 was opened the 9th (before the 11th) and not yet closed so that counts as 1&lt;/P&gt;&lt;P&gt;Line 4 was opened the 10th (before the 11th) and closed the 16th (after the 11th) and was thus still opened when line 2 was closed so it counts as 1&lt;/P&gt;&lt;P&gt;Line 5, 6 and 7 were alsc closed the 11th so they count as 0&lt;/P&gt;&lt;P&gt;Line 8 was opened the 12th so after the line 2 was closed so counts as 0&lt;/P&gt;&lt;P&gt;Line 9 was opened the 15th so after the line 2 was closed so counts as 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I would want is to have the value 2 in the new column at the end of line 2 which is the sum from end line listed above. And to repeat this process for each line.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this has helped clarify my request&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 20:21:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Number-of-Rows-Based-on-Filter-From-Current-Row/m-p/1728568#M35781</guid>
      <dc:creator>lagacem</dc:creator>
      <dc:date>2021-03-17T20:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: Count Number of Rows Based on Filter From Current Row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Number-of-Rows-Based-on-Filter-From-Current-Row/m-p/1728639#M35784</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/user/viewprofilepage/user-id/282509" target="_blank"&gt;@lagacem,&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can try the next option:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#StillOpenedInc = 
VAR currentResolvedDate = SELECTEDVALUE('Table'[Resolved_date])
VAR Result = 
    COUNTROWS(FILTER(
            ALL('Table'),
            currentResolvedDate &amp;gt; 'Table'[Opened_date] &amp;amp;&amp;amp;
            currentResolvedDate &amp;lt; 'Table'[Resolved_date]
        ))
RETURN IF(ISBLANK(Result), 0, Result)&lt;/LI-CODE&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 20:58:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Number-of-Rows-Based-on-Filter-From-Current-Row/m-p/1728639#M35784</guid>
      <dc:creator>ERD</dc:creator>
      <dc:date>2021-03-17T20:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: Count Number of Rows Based on Filter From Current Row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Number-of-Rows-Based-on-Filter-From-Current-Row/m-p/1731199#M35868</link>
      <description>&lt;P&gt;Works great thanks so much!&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2021 18:52:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Number-of-Rows-Based-on-Filter-From-Current-Row/m-p/1731199#M35868</guid>
      <dc:creator>lagacem</dc:creator>
      <dc:date>2021-03-18T18:52:37Z</dc:date>
    </item>
  </channel>
</rss>

