<?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 from three unrelated tables in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-Date-from-three-unrelated-tables/m-p/4135705#M164277</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="583197" data-lia-user-login="Tmk123" class="lia-mention lia-mention-user"&gt;Tmk123&lt;/a&gt;&amp;nbsp;- I cant see your error without seeing the code you have written.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Besides I have tested the code on a replication of your data and it works, see below:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have also attached my pbix file so you can see that I have structured it exactly as you have set out from your description. The only thing I have changed is the item numbers.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Sep 2024 14:48:45 GMT</pubDate>
    <dc:creator>mark_endicott</dc:creator>
    <dc:date>2024-09-05T14:48:45Z</dc:date>
    <item>
      <title>Min Date from three unrelated tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-Date-from-three-unrelated-tables/m-p/4133728#M164192</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am creating a calculated column and it's returning blanks.&amp;nbsp; Is there a good way to manage this?&amp;nbsp; Perhaps the statement under the "Return" can be altered?&amp;nbsp; The three tables are not related.&amp;nbsp; Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;_Create Date =&lt;/P&gt;&lt;P&gt;VAR _itemNo = Table1[ItemNo]&lt;/P&gt;&lt;P&gt;VAR _Date_InvMaster =&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CALCULATE( MIN(Table1[record_est_date]), FILTER(Table1, Table1[item_num] = _itemNo))&lt;/P&gt;&lt;P&gt;VAR _Date_HockPO =&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CALCULATE( MIN('Table2'[received_date]), FILTER('Table2', 'Table2'[item_num] = _itemNo))&lt;/P&gt;&lt;P&gt;VAR _Date_Inventory =&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CALCULATE( MIN(Table3[LastReceipt]), FILTER(Table3, Table3[ItemNo] = _itemNo))&lt;/P&gt;&lt;P&gt;RETURN&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MIN(MIN(_Date_InvMaster, _Date_HockPO), _Date_InvMaster)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the result.&amp;nbsp; The item number is on the left.&amp;nbsp; The three numbered columns show the VAR outputs above.&amp;nbsp; The last column is the output of the calculated column.&amp;nbsp; My goal is to have the minimum date from the three VARs appear in the calculated column.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 15:20:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-Date-from-three-unrelated-tables/m-p/4133728#M164192</guid>
      <dc:creator>Tmk123</dc:creator>
      <dc:date>2024-09-04T15:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: Min Date from three unrelated tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-Date-from-three-unrelated-tables/m-p/4133758#M164195</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I think one problem is that you called 2 times the same variable date_invmaster.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;MIN(MIN(_Date_InvMaster, _Date_HockPO), _Date_InvMaster)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The second problem I think it's that you are not excluding blank values. So the min is always the blank.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You need to exclude blanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 15:41:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-Date-from-three-unrelated-tables/m-p/4133758#M164195</guid>
      <dc:creator>Gabry</dc:creator>
      <dc:date>2024-09-04T15:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: Min Date from three unrelated tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-Date-from-three-unrelated-tables/m-p/4133801#M164196</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="583197" data-lia-user-login="Tmk123" class="lia-mention lia-mention-user"&gt;Tmk123&lt;/a&gt;&amp;nbsp;You need to exclude blanks from the calculations, otherwise MIN will find that. You can also improve the RETURN statement to use MINX which will iterate over a VAR that unions all the results together, you can try amending the DAX below to suit your model:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;VAR _itemNo = 'Table'[item_num]
VAR _Date_InvMaster =
    CALCULATETABLE (
        SUMMARIZE (
            'Table',
            'Table'[item_num],
            "Date", MIN ( 'Table'[record_est_date] )
        ),
        'Table'[item_num] = _itemNo,
        'Table'[record_est_date] &amp;lt;&amp;gt; BLANK ()
    )
VAR _Date_HockPO =
    CALCULATETABLE (
        SUMMARIZE ( Table2, Table2[item_num], "Date", MIN ( Table2[received_date] ) ),
        'Table2'[item_num] = _itemNo,
        Table2[received_date] &amp;lt;&amp;gt; BLANK ()
    )
VAR _Date_Inventory =
    CALCULATETABLE (
        SUMMARIZE ( Table3, Table3[item_num], "Date", MIN ( Table3[LastReceipt] ) ),
        Table3[item_num] = _itemNo,
        Table3[LastReceipt] &amp;lt;&amp;gt; BLANK ()
    )
VAR _union_tables =
    UNION ( _Date_InvMaster, _Date_HockPO, _Date_Inventory )
RETURN
    MINX ( _union_tables, [Date] )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 16:03:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-Date-from-three-unrelated-tables/m-p/4133801#M164196</guid>
      <dc:creator>mark_endicott</dc:creator>
      <dc:date>2024-09-04T16:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: Min Date from three unrelated tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-Date-from-three-unrelated-tables/m-p/4135458#M164266</link>
      <description>&lt;P&gt;So right! I did call it twice.&amp;nbsp; Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 12:38:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-Date-from-three-unrelated-tables/m-p/4135458#M164266</guid>
      <dc:creator>Tmk123</dc:creator>
      <dc:date>2024-09-05T12:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: Min Date from three unrelated tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-Date-from-three-unrelated-tables/m-p/4135554#M164269</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="583197" data-lia-user-login="Tmk123" class="lia-mention lia-mention-user"&gt;Tmk123&lt;/a&gt;&amp;nbsp;- Have you been able to check if this solution works fr you?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 13:26:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-Date-from-three-unrelated-tables/m-p/4135554#M164269</guid>
      <dc:creator>mark_endicott</dc:creator>
      <dc:date>2024-09-05T13:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: Min Date from three unrelated tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-Date-from-three-unrelated-tables/m-p/4135673#M164274</link>
      <description>&lt;P&gt;Thanks for your response.&amp;nbsp; I am in the middle of trying your suggestion.&amp;nbsp; It's giving me a circular dependency error so I'm researching to see how to overcome that - that is, unless you see why it's giving me that error.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 14:31:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-Date-from-three-unrelated-tables/m-p/4135673#M164274</guid>
      <dc:creator>Tmk123</dc:creator>
      <dc:date>2024-09-05T14:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: Min Date from three unrelated tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-Date-from-three-unrelated-tables/m-p/4135705#M164277</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="583197" data-lia-user-login="Tmk123" class="lia-mention lia-mention-user"&gt;Tmk123&lt;/a&gt;&amp;nbsp;- I cant see your error without seeing the code you have written.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Besides I have tested the code on a replication of your data and it works, see below:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have also attached my pbix file so you can see that I have structured it exactly as you have set out from your description. The only thing I have changed is the item numbers.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 14:48:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-Date-from-three-unrelated-tables/m-p/4135705#M164277</guid>
      <dc:creator>mark_endicott</dc:creator>
      <dc:date>2024-09-05T14:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: Min Date from three unrelated tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-Date-from-three-unrelated-tables/m-p/4142824#M164651</link>
      <description>&lt;P&gt;Thank you!!&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 12:55:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Min-Date-from-three-unrelated-tables/m-p/4142824#M164651</guid>
      <dc:creator>Tmk123</dc:creator>
      <dc:date>2024-09-10T12:55:07Z</dc:date>
    </item>
  </channel>
</rss>

