<?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 to populate next delivery date. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-to-populate-next-delivery-date/m-p/4034360#M159762</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="710490" data-lia-user-login="Polar_A" class="lia-mention lia-mention-user"&gt;Polar_A&lt;/a&gt;&amp;nbsp;, Try using below measure&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Next Delivery Date =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;MIN('Delivery Schedule'[clu_deliverydate.1]),&lt;BR /&gt;FILTER(&lt;BR /&gt;ALLEXCEPT('Delivery Schedule', 'Delivery Schedule'[Patient ID]),&lt;BR /&gt;'Delivery Schedule'[clu_deliverydate.1] &amp;gt; TODAY()&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;</description>
    <pubDate>Wed, 10 Jul 2024 10:05:01 GMT</pubDate>
    <dc:creator>bhanu_gautam</dc:creator>
    <dc:date>2024-07-10T10:05:01Z</dc:date>
    <item>
      <title>Dax to populate next delivery date.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-to-populate-next-delivery-date/m-p/4034293#M159758</link>
      <description>&lt;P&gt;Hi I need a bit of help with one of my DAx measures.&lt;BR /&gt;&lt;BR /&gt;I'm trying to generate the next delivery date to show after today.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;My current measure is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Next Delivery Date =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;MIN&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Delivery Schedule'&lt;/SPAN&gt;&lt;SPAN&gt;[clu_deliverydate.1]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;'Delivery Schedule'&lt;/SPAN&gt;&lt;SPAN&gt;[clu_deliverydate.1]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;TODAY&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;ALLEXCEPT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Patients&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Patients&lt;/SPAN&gt;&lt;SPAN&gt;[Patient ID]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;This removes all of the past delivery dates but I want to limit this one to only show the next one. For example this will show delivery 03 and only Delivery 03&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;img /&gt;&lt;P&gt;&lt;BR /&gt;KR,&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 10 Jul 2024 09:47:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-to-populate-next-delivery-date/m-p/4034293#M159758</guid>
      <dc:creator>Polar_A</dc:creator>
      <dc:date>2024-07-10T09:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: Dax to populate next delivery date.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-to-populate-next-delivery-date/m-p/4034360#M159762</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="710490" data-lia-user-login="Polar_A" class="lia-mention lia-mention-user"&gt;Polar_A&lt;/a&gt;&amp;nbsp;, Try using below measure&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Next Delivery Date =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;MIN('Delivery Schedule'[clu_deliverydate.1]),&lt;BR /&gt;FILTER(&lt;BR /&gt;ALLEXCEPT('Delivery Schedule', 'Delivery Schedule'[Patient ID]),&lt;BR /&gt;'Delivery Schedule'[clu_deliverydate.1] &amp;gt; TODAY()&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2024 10:05:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-to-populate-next-delivery-date/m-p/4034360#M159762</guid>
      <dc:creator>bhanu_gautam</dc:creator>
      <dc:date>2024-07-10T10:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: Dax to populate next delivery date.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-to-populate-next-delivery-date/m-p/4034379#M159764</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="625922" data-lia-user-login="bhanu_gautam" class="lia-mention lia-mention-user"&gt;bhanu_gautam&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;Its not working as the Patients ID is in a different table. It is in the Patients Stable and not the delivery Schedule table.&lt;BR /&gt;&lt;BR /&gt;KR&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2024 10:09:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-to-populate-next-delivery-date/m-p/4034379#M159764</guid>
      <dc:creator>Polar_A</dc:creator>
      <dc:date>2024-07-10T10:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: Dax to populate next delivery date.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-to-populate-next-delivery-date/m-p/4034559#M159807</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="710490" data-lia-user-login="Polar_A" class="lia-mention lia-mention-user"&gt;Polar_A&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try using this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;Next Delivery Date = 
CALCULATE(
    MIN('Delivery Schedule'[clu_deliverydate.1]),
    FILTER(
        ALLEXCEPT(Patients, Patients[Patient ID]),
        'Delivery Schedule'[clu_deliverydate.1] &amp;gt; TODAY()
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;I&gt;Works for you? Mark this post as a solution if it does!&lt;BR /&gt;Check out this blog of mine:&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-Export-Telemetry-Data-from-Azure-IoT-Central-into-Power/m-p/2845191#U2845191" target="_blank" rel="noopener"&gt;How to Export Telemetry Data from Azure IoT Central into Power BI&lt;/A&gt;&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2024 11:56:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-to-populate-next-delivery-date/m-p/4034559#M159807</guid>
      <dc:creator>Shaurya</dc:creator>
      <dc:date>2024-07-10T11:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: Dax to populate next delivery date.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-to-populate-next-delivery-date/m-p/4035864#M159936</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="710490" data-lia-user-login="Polar_A" class="lia-mention lia-mention-user"&gt;Polar_A&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the reply from &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="625922" data-lia-user-login="bhanu_gautam" class="lia-mention lia-mention-user"&gt;bhanu_gautam&lt;/a&gt;&amp;nbsp; and &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="450074" data-lia-user-login="Shaurya" class="lia-mention lia-mention-user"&gt;Shaurya&lt;/a&gt;&amp;nbsp;, please allow me to provide another insight:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try this.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Next Delivery Date =
CALCULATE(
    MINX(
        TOPN(
            1,
            FILTER(
                'Delivery Schedule',
                'Delivery Schedule'[clu_deliverydate.1] &amp;gt; TODAY()
            ),
            'Delivery Schedule'[clu_deliverydate.1],
            ASC
        ),
        'Delivery Schedule'[clu_deliverydate.1]
    ),
    ALLEXCEPT(Patients, Patients[Patient ID])
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this doesn't solve your problem.&amp;nbsp;&lt;SPAN&gt;Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.&amp;nbsp;We can better understand the problem and help you&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Clara Gong&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2024 02:17:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-to-populate-next-delivery-date/m-p/4035864#M159936</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-11T02:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: Dax to populate next delivery date.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-to-populate-next-delivery-date/m-p/4036934#M160016</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="450074" data-lia-user-login="Shaurya" class="lia-mention lia-mention-user"&gt;Shaurya&lt;/a&gt;,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="625922" data-lia-user-login="bhanu_gautam" class="lia-mention lia-mention-user"&gt;bhanu_gautam&lt;/a&gt;.&lt;BR /&gt;&lt;BR /&gt;Thank you all this was the best solution for me with the measure NDD showing as Next Day Delivery.&lt;BR /&gt;&lt;BR /&gt;I am now trying to group it by the prescription number, so that with prescription number 3001067 shows delivery 02 and not delivery 03; Prescription Number 3001034 shows Delivery 03 and not Delivery 04, 05, 06, etc..&lt;BR /&gt;&lt;BR /&gt;Essentially I want to next delivery based on the prescription number.&lt;BR /&gt;&lt;BR /&gt;KR&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2024 11:17:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-to-populate-next-delivery-date/m-p/4036934#M160016</guid>
      <dc:creator>Polar_A</dc:creator>
      <dc:date>2024-07-11T11:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: Dax to populate next delivery date.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-to-populate-next-delivery-date/m-p/4039169#M160146</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="710490" data-lia-user-login="Polar_A" class="lia-mention lia-mention-user"&gt;Polar_A&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Next Delivery Date =
VAR _date =
    CALCULATE (
        MIN ( 'Delivery Schedule'[clu_deliverydate.1] ),
        'Delivery Schedule'[clu_deliverydate.1] &amp;gt; TODAY (),
        FILTER (
            'Patients',
            'Patients'[Prescription] = MAX ( 'Patients'[Prescription] )
        )
    )
RETURN
    IF ( MAX ( 'Delivery Schedule'[clu_deliverydate.1] ) = _date, 1, 0 )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then filter the data with Next Delivery Date of 1 in the filter.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your Current Period does not refer to this, please clarify in a follow-up reply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Clara Gong&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2024 09:52:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-to-populate-next-delivery-date/m-p/4039169#M160146</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-12T09:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: Dax to populate next delivery date.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-to-populate-next-delivery-date/m-p/4044234#M160409</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;BR /&gt;&lt;BR /&gt;I tried this and it is still showing everything rather than just the one delivery which i would want to be delivery 04.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2024 11:49:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-to-populate-next-delivery-date/m-p/4044234#M160409</guid>
      <dc:creator>Polar_A</dc:creator>
      <dc:date>2024-07-16T11:49:51Z</dc:date>
    </item>
  </channel>
</rss>

