<?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: Min date to be a null value if any of the date value is a null value in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-date-to-be-a-null-value-if-any-of-the-date-value-is-a-null/m-p/3220896#M117724</link>
    <description>&lt;P&gt;It's not clear if you want this in a column or measure, but I think this should work in either:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure/Column = 
VAR _earliestRow = 
INDEX( 
    1, 
    ALL( Data[ID], Data[Close date] ), 
    ORDERBY( Data[Close date], ASC ), 
    KEEP, 
    PARTITIONBY( Data[ID] ) 
)
RETURN
CALCULATE( 
    MIN( Data[Close date] ),
    REMOVEFILTERS( Data ),
    _earliestRow
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 04 May 2023 22:12:31 GMT</pubDate>
    <dc:creator>MarkLaf</dc:creator>
    <dc:date>2023-05-04T22:12:31Z</dc:date>
    <item>
      <title>Min date to be a null value if any of the date value is a null value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-date-to-be-a-null-value-if-any-of-the-date-value-is-a-null/m-p/3218198#M117540</link>
      <description>&lt;P&gt;Is there a way to calculate a date to be set to null if one of the date is null?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have close date&lt;/P&gt;&lt;P&gt;A: null&lt;/P&gt;&lt;P&gt;A: 1/2/2012&lt;/P&gt;&lt;P&gt;A: 1/4/2023&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If per A has a null close date then the value to be null&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 15:05:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-date-to-be-a-null-value-if-any-of-the-date-value-is-a-null/m-p/3218198#M117540</guid>
      <dc:creator>bharukc</dc:creator>
      <dc:date>2023-05-03T15:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: Min date to be a null value if any of the date value is a null value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-date-to-be-a-null-value-if-any-of-the-date-value-is-a-null/m-p/3218773#M117585</link>
      <description>&lt;P&gt;We probably need some more information, but I'll take a guess at what you are asking for and we can go from there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm assuming your question is assuming data like:&lt;/P&gt;
&lt;P&gt;Data =&amp;nbsp;&lt;/P&gt;
&lt;TABLE class="lia-align-left" style="width: 50%;" border="1" width="50%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;&lt;STRONG&gt;Product&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="50%"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;A&lt;/TD&gt;
&lt;TD width="50%"&gt;null&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;A&lt;/TD&gt;
&lt;TD width="50%"&gt;1/2/2012&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;A&lt;/TD&gt;
&lt;TD width="50%"&gt;1/4/2023&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;B&lt;/TD&gt;
&lt;TD width="50%"&gt;2/3/2014&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;B&lt;/TD&gt;
&lt;TD width="50%"&gt;3/4/2015&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;C&lt;/TD&gt;
&lt;TD width="50%"&gt;1/1/1900&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;C&lt;/TD&gt;
&lt;TD width="50%"&gt;null&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And if you want to be able to create a table visual with Table[Product] and [Measure] in the fields such that it looks like:&lt;/P&gt;
&lt;TABLE border="1" width="44.44315843621399%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;&lt;STRONG&gt;Product&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;&lt;STRONG&gt;Measure&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;A&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;null&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;B&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;2/3/2014&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;C&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;null&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then the following may be what you want:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
VAR _minDt = MIN( Data[Date] )
VAR _noBlankDts = CALCULATE( ISEMPTY( Data ), ISBLANK( Data[Date] ) )
RETURN
IF( _noBlankDts, _minDt )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 22:42:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-date-to-be-a-null-value-if-any-of-the-date-value-is-a-null/m-p/3218773#M117585</guid>
      <dc:creator>MarkLaf</dc:creator>
      <dc:date>2023-05-03T22:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: Min date to be a null value if any of the date value is a null value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-date-to-be-a-null-value-if-any-of-the-date-value-is-a-null/m-p/3219885#M117669</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="51073" data-lia-user-login="MarkLaf" class="lia-mention lia-mention-user"&gt;MarkLaf&lt;/a&gt;&amp;nbsp;, the solution did not work for me.&lt;/P&gt;&lt;P&gt;here is my table&lt;/P&gt;&lt;P&gt;ID. &amp;nbsp; &amp;nbsp; &amp;nbsp; Work. &amp;nbsp; &amp;nbsp;Close date. &amp;nbsp; &amp;nbsp; Desired coumn&lt;BR /&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Ab. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;BR /&gt;1. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Bb. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1/23/2012&lt;/P&gt;&lt;P&gt;1. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Cc. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3/23/2015&lt;/P&gt;&lt;P&gt;2. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Ab. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2/30/2012. &amp;nbsp; &amp;nbsp; 2/30/2012&lt;/P&gt;&lt;P&gt;2. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Ac. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2/23/2015. &amp;nbsp; &amp;nbsp; 2/30/2012&lt;/P&gt;&lt;P&gt;2. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Cc. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5/15/2018. &amp;nbsp; &amp;nbsp; &amp;nbsp;2/30/2012&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if any of close date is empty, I would like the see a measure that would get a minimum value per id (includine null value)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2023 12:25:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-date-to-be-a-null-value-if-any-of-the-date-value-is-a-null/m-p/3219885#M117669</guid>
      <dc:creator>bharukc</dc:creator>
      <dc:date>2023-05-04T12:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: Min date to be a null value if any of the date value is a null value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-date-to-be-a-null-value-if-any-of-the-date-value-is-a-null/m-p/3220269#M117691</link>
      <description>&lt;P&gt;hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="365930" data-lia-user-login="bharukc" class="lia-mention lia-mention-user"&gt;bharukc&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the data sample seems out of shape. check this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2023 14:42:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-date-to-be-a-null-value-if-any-of-the-date-value-is-a-null/m-p/3220269#M117691</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-05-04T14:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: Min date to be a null value if any of the date value is a null value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-date-to-be-a-null-value-if-any-of-the-date-value-is-a-null/m-p/3220896#M117724</link>
      <description>&lt;P&gt;It's not clear if you want this in a column or measure, but I think this should work in either:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure/Column = 
VAR _earliestRow = 
INDEX( 
    1, 
    ALL( Data[ID], Data[Close date] ), 
    ORDERBY( Data[Close date], ASC ), 
    KEEP, 
    PARTITIONBY( Data[ID] ) 
)
RETURN
CALCULATE( 
    MIN( Data[Close date] ),
    REMOVEFILTERS( Data ),
    _earliestRow
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2023 22:12:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-date-to-be-a-null-value-if-any-of-the-date-value-is-a-null/m-p/3220896#M117724</guid>
      <dc:creator>MarkLaf</dc:creator>
      <dc:date>2023-05-04T22:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Min date to be a null value if any of the date value is a null value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-date-to-be-a-null-value-if-any-of-the-date-value-is-a-null/m-p/3222857#M117884</link>
      <description>&lt;P&gt;Still figuring out the new window functions a bit.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I realized that INDEX will return a table of multiple rows if it's in a filter context that includes multiple partitions (e.g. this will happen in a total row in a table, subtotals in matrix, etc.).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not sure if there is a better method, but using INDEX &lt;EM&gt;again&lt;/EM&gt; to select one row from the resulting table of partitions (using same ordering logic from original INDEX) should provide a good summary result as needed:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure=
VAR _dir = 1 //  Last = 0   First = 1
VAR _dtByPartition = 
    INDEX( 
        1, ALL( Data[ID], Data[Close date] ), 
        ORDERBY( Data[Close date], _dir ), KEEP, PARTITIONBY( Data[ID] ) 
    )
VAR _selectPartition = 
    INDEX( 
        1, _dtByPartition, 
        ORDERBY( Data[Close date], _dir ), KEEP
    )
RETURN
SUMMARIZE( _selectPartition, Data[Close date] )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2023 20:52:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-date-to-be-a-null-value-if-any-of-the-date-value-is-a-null/m-p/3222857#M117884</guid>
      <dc:creator>MarkLaf</dc:creator>
      <dc:date>2023-05-05T20:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: Min date to be a null value if any of the date value is a null value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-date-to-be-a-null-value-if-any-of-the-date-value-is-a-null/m-p/3223078#M117909</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="365930" data-lia-user-login="bharukc" class="lia-mention lia-mention-user"&gt;bharukc&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;not sure if i fully get you, try to plot a table visual the ID column and a measure like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;measure = 
IF(
    BLANK() IN VALUES(data[CloseDate]),
    " ",
    CALCULATE(
        MIN(data[CloseDate]),
        data[ID]=MAX(data[ID])
    )
)&lt;/LI-CODE&gt;&lt;P&gt;it worked like:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 06 May 2023 06:32:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-date-to-be-a-null-value-if-any-of-the-date-value-is-a-null/m-p/3223078#M117909</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-05-06T06:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: Min date to be a null value if any of the date value is a null value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-date-to-be-a-null-value-if-any-of-the-date-value-is-a-null/m-p/3223082#M117912</link>
      <description>&lt;P&gt;if you would like to include other columns, try like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;measure2 = 
IF(
    BLANK() IN 
    CALCULATETABLE(
        VALUES(data[CloseDate]),
        ALLEXCEPT(data, data[ID])
    ),
    " ",
    CALCULATE(
        MIN(data[CloseDate]),
        ALLEXCEPT(data, data[ID])
    )
)&lt;/LI-CODE&gt;&lt;P&gt;it worked like:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 06 May 2023 06:36:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-date-to-be-a-null-value-if-any-of-the-date-value-is-a-null/m-p/3223082#M117912</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-05-06T06:36:21Z</dc:date>
    </item>
  </channel>
</rss>

