<?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: DAX - Getting Earliest Date Time in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Getting-Earliest-Date-Time/m-p/3797417#M148412</link>
    <description>&lt;P&gt;Most likely your column is formatted as text rather than DateTime.&lt;/P&gt;</description>
    <pubDate>Thu, 28 Mar 2024 17:38:44 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2024-03-28T17:38:44Z</dc:date>
    <item>
      <title>DAX - Getting Earliest Date Time</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Getting-Earliest-Date-Time/m-p/3795070#M148308</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am currently looking at a table of data like the below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Number&amp;nbsp;&amp;nbsp; Value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date/Time&lt;/P&gt;&lt;P&gt;001&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/13/2023 8:29:05 AM&lt;/P&gt;&lt;P&gt;001&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Group 1&amp;nbsp;&amp;nbsp; 12/13/2023 8:30:06 AM&lt;/P&gt;&lt;P&gt;001&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Group 2&amp;nbsp;&amp;nbsp; 12/14/2023 12:36:42 PM&lt;/P&gt;&lt;P&gt;001&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Group 3&amp;nbsp;&amp;nbsp; 12/18/2023&amp;nbsp; 5:04:36 AM&lt;/P&gt;&lt;P&gt;001&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Group 4&amp;nbsp;&amp;nbsp; 12/18/2024&amp;nbsp; 4:51:38 AM&lt;/P&gt;&lt;P&gt;001&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Group 1&amp;nbsp;&amp;nbsp;&amp;nbsp; 1/1/2024&amp;nbsp; 3:50:26 AM&lt;/P&gt;&lt;P&gt;001&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Group 2&amp;nbsp;&amp;nbsp;&amp;nbsp; 1/1/2024&amp;nbsp; 6:50:26 AM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have these columns in a table visual along with a measure and in the measure I am trying to return the earliest start time for "group 1". I also have a slicer that i use to get the dates in my variables from(this slicer is in an unrelated table from the table my data is in.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far this is my DAX:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Measure 1 =&lt;/P&gt;&lt;P&gt;VAR SelectedMonthStartDate = MINX(SomeTable, SomeTable[Created])&lt;BR /&gt;VAR Sundayfollowingthe1st = IF(FirstDayOfMonth + MOD(8 - WEEKDAY(FirstDayOfMonth), 7) = SelectedMonthStartDate, (FirstDayOfMonth + MOD(8 - WEEKDAY(FirstDayOfMonth), 7) + 7), (FirstDayOfMonth + MOD(8 - WEEKDAY(FirstDayOfMonth), 7))+1)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;VAR AbsoluteEarliestStartPerTicket =&lt;BR /&gt;SUMMARIZE(&lt;BR /&gt;SomeOtherTable,&lt;BR /&gt;SomeOtherTable[Number],&lt;BR /&gt;"EarliestStart", MIN(SomeOtherTable[Date/Time])&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;RETURN COUNTROWS(AbsoluteEarliestStartPerTicket)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The issue i am facing is i cant get it to return the earliest start time whihc in the example above would be 12/13/2023 8:30:06 AM&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Intsead it is returning 1/1/2024&amp;nbsp; 3:50:26 AM&lt;BR /&gt;&lt;BR /&gt;Any help is greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2024 19:45:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Getting-Earliest-Date-Time/m-p/3795070#M148308</guid>
      <dc:creator>Anonymous_226</dc:creator>
      <dc:date>2024-03-27T19:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - Getting Earliest Date Time</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Getting-Earliest-Date-Time/m-p/3797417#M148412</link>
      <description>&lt;P&gt;Most likely your column is formatted as text rather than DateTime.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2024 17:38:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Getting-Earliest-Date-Time/m-p/3797417#M148412</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-03-28T17:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - Getting Earliest Date Time</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Getting-Earliest-Date-Time/m-p/3797446#M148413</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;the column is formatted as General Date&lt;BR /&gt;&lt;BR /&gt;*3/14/2001 1:30:55 PM (General Date)&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2024 18:05:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Getting-Earliest-Date-Time/m-p/3797446#M148413</guid>
      <dc:creator>Anonymous_226</dc:creator>
      <dc:date>2024-03-28T18:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - Getting Earliest Date Time</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Getting-Earliest-Date-Time/m-p/3797465#M148414</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2024 18:14:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Getting-Earliest-Date-Time/m-p/3797465#M148414</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-03-28T18:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - Getting Earliest Date Time</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Getting-Earliest-Date-Time/m-p/3798426#M148458</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="522255" data-lia-user-login="Anonymous_226" class="lia-mention lia-mention-user"&gt;Anonymous_226&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp; reply solve your problem? I tested the pbix file and everything works as expected! If so, please mark it as the correct solution, and point out if the problem persists.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Adamk Kong&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2024 08:43:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Getting-Earliest-Date-Time/m-p/3798426#M148458</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-29T08:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - Getting Earliest Date Time</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Getting-Earliest-Date-Time/m-p/3802597#M148674</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;i took a look at your pbix and formating the column as earliest would work there but for my case i have to use a measure and accomplish this in DAX. I am connected Direct Query to dataset i am limited to DAX measures only. Do you have any other suggestions?&lt;BR /&gt;&lt;BR /&gt;I have gotten close with this measure i have:&lt;/P&gt;&lt;P&gt;VAR StartTimesAsInteger =&lt;/P&gt;&lt;P&gt;ADDCOLUMNS(&lt;/P&gt;&lt;P&gt;FILTER(&lt;/P&gt;&lt;P&gt;SomeOtherTable,&lt;/P&gt;&lt;P&gt;SomeOtherTable[Value] = "Group 1"&lt;/P&gt;&lt;P&gt;),&lt;/P&gt;&lt;P&gt;"StartInteger",&lt;/P&gt;&lt;P&gt;YEAR(SomeOtherTable[Start]) * 10000000000 +&lt;/P&gt;&lt;P&gt;MONTH(SomeOtherTable[Start]) * 100000000 +&lt;/P&gt;&lt;P&gt;DAY(SomeOtherTable) * 1000000 +&lt;/P&gt;&lt;P&gt;HOUR(SomeOtherTable) * 10000 +&lt;/P&gt;&lt;P&gt;MINUTE(SomeOtherTable) * 100 +&lt;/P&gt;&lt;P&gt;SECOND(SomeOtherTable),&lt;/P&gt;&lt;P&gt;"UniqueKey",&lt;/P&gt;&lt;P&gt;SomeOtherTable[Number] &amp;amp; "|" &amp;amp; "Group 1"&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;VAR RankedStartTimes =&lt;/P&gt;&lt;P&gt;ADDCOLUMNS(&lt;/P&gt;&lt;P&gt;StartTimesAsInteger,&lt;/P&gt;&lt;P&gt;"Rank",&lt;/P&gt;&lt;P&gt;RANKX(&lt;/P&gt;&lt;P&gt;FILTER(&lt;/P&gt;&lt;P&gt;StartTimesAsInteger,&lt;/P&gt;&lt;P&gt;[UniqueKey] = EARLIER([UniqueKey])&lt;/P&gt;&lt;P&gt;),&lt;/P&gt;&lt;P&gt;[StartInteger],&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;ASC,&lt;/P&gt;&lt;P&gt;Dense&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;VAR EarliestStartTimes =&lt;/P&gt;&lt;P&gt;FILTER(&lt;/P&gt;&lt;P&gt;RankedStartTimes,&lt;/P&gt;&lt;P&gt;[Rank] = 1&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;RETURN COUNTROWS(EarliestStartTimes)&lt;BR /&gt;&lt;BR /&gt;In this example i have 2 entries for group 1 that have the same number in the number column but i cant get the measure to return me the row with the earliest start time.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2024 18:28:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Getting-Earliest-Date-Time/m-p/3802597#M148674</guid>
      <dc:creator>Anonymous_226</dc:creator>
      <dc:date>2024-04-01T18:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - Getting Earliest Date Time</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Getting-Earliest-Date-Time/m-p/3802905#M148681</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2024 19:05:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Getting-Earliest-Date-Time/m-p/3802905#M148681</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-04-01T19:05:16Z</dc:date>
    </item>
  </channel>
</rss>

