<?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 Rows After a Date Specified on a Measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Rows-After-a-Date-Specified-on-a-Measure/m-p/1549638#M30643</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="92178" data-lia-user-login="AlB" class="lia-mention lia-mention-user"&gt;AlB&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am sure that [M_ReferenceDate] is of type DATETIME. I had a prior calculation having the value of [M_ReferenceDate], which is:&lt;/P&gt;&lt;PRE&gt;M_ReferenceDate = CALCULATE(MAX('Another Table'[Date/Time]), FILTER('Another Table', 'Another Table'[Status] = "Started"))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where&amp;nbsp;&lt;STRONG&gt;Another Table&amp;nbsp;&lt;/STRONG&gt;has a sample value below:&amp;nbsp;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;EM&gt;Note: I'm getting posting problems whenever I tried to insert a table, so I just made it manually below&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Date/Time&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Status&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;08/15/2020 12:49:32 PM&amp;nbsp; Started&lt;/P&gt;&lt;P&gt;08/15/2020 02:12:47 PM&amp;nbsp; Ended&lt;/P&gt;&lt;P&gt;09/15/2020 06:59:06 PM&amp;nbsp; Started&lt;/P&gt;&lt;P&gt;09/15/2020 08:36:09 PM&amp;nbsp; Ended&lt;/P&gt;&lt;P&gt;11/11/2020 11:46:11 AM&amp;nbsp; Started&lt;/P&gt;&lt;P&gt;11/11/2020 12:24:01 PM&amp;nbsp; Ended&lt;/P&gt;&lt;P&gt;12/14/2020 03:30:53 AM&amp;nbsp; Started&lt;/P&gt;&lt;P&gt;12/14/2020 05:05:25 AM&amp;nbsp; Ended&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The above calculation for&amp;nbsp;&lt;STRONG&gt;[M_ReferenceDate]&lt;/STRONG&gt; gets the highest value, in this case,&amp;nbsp;&lt;STRONG&gt;12/14/2020 03:30:53 AM&lt;/STRONG&gt; and is&amp;nbsp;formatted as DATETIME.&lt;/P&gt;</description>
    <pubDate>Mon, 14 Dec 2020 17:52:24 GMT</pubDate>
    <dc:creator>theotejada</dc:creator>
    <dc:date>2020-12-14T17:52:24Z</dc:date>
    <item>
      <title>Count Rows After a Date Specified on a Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Rows-After-a-Date-Specified-on-a-Measure/m-p/1549387#M30636</link>
      <description>&lt;P&gt;I have a table with a similar look like this (we'll name this table as 'Sample'):&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Date/Time&lt;/TD&gt;&lt;TD&gt;Insignificant Values&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10/17/2020 05:02:38 PM&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;lorem&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10/17/2020 05:03:31 PM&lt;/TD&gt;&lt;TD&gt;ipsum&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10/17/2020 05:04:25 PM&lt;/TD&gt;&lt;TD&gt;dolor&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10/17/2020 05:06:12 PM&lt;/TD&gt;&lt;TD&gt;sit&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12/14/2020 04:30:57 AM&lt;/TD&gt;&lt;TD&gt;amet&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12/14/2020 04:34:43 AM&lt;/TD&gt;&lt;TD&gt;consectetur&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;12/14/2020 04:39:42 AM&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;adipiscing&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12/14/2020 04:43:59 AM&lt;/TD&gt;&lt;TD&gt;elit&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12/14/2020 04:44:51 AM&lt;/TD&gt;&lt;TD&gt;sed&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want is a measure that will count the number of rows for this table if the date/time is beyond a date/time placed on a measure (in this case,&lt;STRONG&gt;&amp;nbsp;[M_ReferenceDate] = 12/14/2020 03:30:53 AM&lt;/STRONG&gt;).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am expecting a count of 5 on this example, but I'm getting the count of the entire rows (9) without satisfying the condition using the formula &lt;STRONG&gt;COUNTROWS(FILTER('Sample','Sample'[Date/Time] &amp;gt; [M_ReferenceDate]))&lt;/STRONG&gt;. I even tried creating a column with expression &lt;STRONG&gt;IF('Sample'[Date/Time] &amp;gt; [M_ReferenceDate], 1, 0)&lt;/STRONG&gt; to see if I can have this as backup (then counting the 1s), but it results to all rows being 1 instead of only the last 4.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm still a beginner on Power BI, and searched for various solutions related to this one, but those solutions still results to the same problem.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 15:50:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Rows-After-a-Date-Specified-on-a-Measure/m-p/1549387#M30636</guid>
      <dc:creator>theotejada</dc:creator>
      <dc:date>2020-12-14T15:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: Count Rows After a Date Specified on a Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Rows-After-a-Date-Specified-on-a-Measure/m-p/1549402#M30637</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="275724" data-lia-user-login="theotejada" class="lia-mention lia-mention-user"&gt;theotejada&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you sure&amp;nbsp; [M_ReferenceDate]&amp;nbsp; is of type datetime?&amp;nbsp; Is the Sample[Date/Time]&amp;nbsp;of type datetime?&lt;/P&gt;
&lt;P&gt;Try this, and it should work with the rest as you have it:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;M_ReferenceDate = CONVERT("12/14/2020 03:30:53 AM", DATETIME)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Please mark the question solved when done and consider &lt;FONT color="#FF9900"&gt;giving a thumbs up if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;Contact me privately for support with any larger-scale BI needs, tutoring, etc.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Cheers&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 15:59:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Rows-After-a-Date-Specified-on-a-Measure/m-p/1549402#M30637</guid>
      <dc:creator>AlB</dc:creator>
      <dc:date>2020-12-14T15:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: Count Rows After a Date Specified on a Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Rows-After-a-Date-Specified-on-a-Measure/m-p/1549638#M30643</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="92178" data-lia-user-login="AlB" class="lia-mention lia-mention-user"&gt;AlB&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am sure that [M_ReferenceDate] is of type DATETIME. I had a prior calculation having the value of [M_ReferenceDate], which is:&lt;/P&gt;&lt;PRE&gt;M_ReferenceDate = CALCULATE(MAX('Another Table'[Date/Time]), FILTER('Another Table', 'Another Table'[Status] = "Started"))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where&amp;nbsp;&lt;STRONG&gt;Another Table&amp;nbsp;&lt;/STRONG&gt;has a sample value below:&amp;nbsp;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;EM&gt;Note: I'm getting posting problems whenever I tried to insert a table, so I just made it manually below&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Date/Time&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Status&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;08/15/2020 12:49:32 PM&amp;nbsp; Started&lt;/P&gt;&lt;P&gt;08/15/2020 02:12:47 PM&amp;nbsp; Ended&lt;/P&gt;&lt;P&gt;09/15/2020 06:59:06 PM&amp;nbsp; Started&lt;/P&gt;&lt;P&gt;09/15/2020 08:36:09 PM&amp;nbsp; Ended&lt;/P&gt;&lt;P&gt;11/11/2020 11:46:11 AM&amp;nbsp; Started&lt;/P&gt;&lt;P&gt;11/11/2020 12:24:01 PM&amp;nbsp; Ended&lt;/P&gt;&lt;P&gt;12/14/2020 03:30:53 AM&amp;nbsp; Started&lt;/P&gt;&lt;P&gt;12/14/2020 05:05:25 AM&amp;nbsp; Ended&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The above calculation for&amp;nbsp;&lt;STRONG&gt;[M_ReferenceDate]&lt;/STRONG&gt; gets the highest value, in this case,&amp;nbsp;&lt;STRONG&gt;12/14/2020 03:30:53 AM&lt;/STRONG&gt; and is&amp;nbsp;formatted as DATETIME.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 17:52:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Rows-After-a-Date-Specified-on-a-Measure/m-p/1549638#M30643</guid>
      <dc:creator>theotejada</dc:creator>
      <dc:date>2020-12-14T17:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: Count Rows After a Date Specified on a Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Rows-After-a-Date-Specified-on-a-Measure/m-p/1549649#M30644</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="275724" data-lia-user-login="theotejada" class="lia-mention lia-mention-user"&gt;theotejada&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Works fine on my side on the data you provided earlier. See it all at work in the attached file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Please mark the question solved when done and consider &lt;FONT color="#FF9900"&gt;giving a thumbs up if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;Contact me privately for support with any larger-scale BI needs, tutoring, etc.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Cheers&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 18:09:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Rows-After-a-Date-Specified-on-a-Measure/m-p/1549649#M30644</guid>
      <dc:creator>AlB</dc:creator>
      <dc:date>2020-12-14T18:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: Count Rows After a Date Specified on a Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Rows-After-a-Date-Specified-on-a-Measure/m-p/1551975#M30713</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="92178" data-lia-user-login="AlB" class="lia-mention lia-mention-user"&gt;AlB&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Actually, it's my data/Power BI acting up, not leading to the expected results. I tried to make another Power BI Dashboard using the same data, and it works as expected. I don't know why, but I think that will be the solution for now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 17:43:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Rows-After-a-Date-Specified-on-a-Measure/m-p/1551975#M30713</guid>
      <dc:creator>theotejada</dc:creator>
      <dc:date>2020-12-15T17:43:14Z</dc:date>
    </item>
  </channel>
</rss>

