<?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 Days Between in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Days-Between/m-p/3262660#M120710</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I have a column named "Purchase Orders" and another named "Delivery Date"&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;There are several duplicate Purchase Orders with distinct Delivery Dates. (See Picture)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am looking to get the days between the Maximum Delivery Date and Today for each Purchase Order.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;For example for the Purchase order "4500031909" the highest would be 7/30/2023 and would need the days between then and today.&lt;/SPAN&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>Wed, 31 May 2023 21:33:52 GMT</pubDate>
    <dc:creator>amandabus21</dc:creator>
    <dc:date>2023-05-31T21:33:52Z</dc:date>
    <item>
      <title>Days Between</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Days-Between/m-p/3262660#M120710</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have a column named "Purchase Orders" and another named "Delivery Date"&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;There are several duplicate Purchase Orders with distinct Delivery Dates. (See Picture)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am looking to get the days between the Maximum Delivery Date and Today for each Purchase Order.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;For example for the Purchase order "4500031909" the highest would be 7/30/2023 and would need the days between then and today.&lt;/SPAN&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>Wed, 31 May 2023 21:33:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Days-Between/m-p/3262660#M120710</guid>
      <dc:creator>amandabus21</dc:creator>
      <dc:date>2023-05-31T21:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: Days Between</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Days-Between/m-p/3262904#M120716</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="424505" data-lia-user-login="amandabus21" class="lia-mention lia-mention-user"&gt;amandabus21&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your description, here are my steps you can follow as a solution.&lt;/P&gt;
&lt;P&gt;(1) This is my test data.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;(2) We can create&amp;nbsp; measures.&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Days = 
var _max=CALCULATE(MAX('Table'[Delivery Date]),FILTER(ALL('Table'),'Table'[Purchase Orders]=MAX('Table'[Purchase Orders])))
return DATEDIFF(TODAY(),_max,DAY)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Abs Days = 
var _max=CALCULATE(MAX('Table'[Delivery Date]),FILTER(ALL('Table'),'Table'[Purchase Orders]=MAX('Table'[Purchase Orders])))
return ABS(DATEDIFF(_max,TODAY(),DAY))&lt;/LI-CODE&gt;
&lt;P&gt;(3) Then the result is as follows.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the above one can't help you get the desired result, please provide some&amp;nbsp;&lt;STRONG&gt;sample data&lt;/STRONG&gt;&amp;nbsp;in your tables (&lt;STRONG&gt;exclude&amp;nbsp;sensitive&amp;nbsp;data&lt;/STRONG&gt;) with&amp;nbsp;&lt;STRONG&gt;Text&lt;/STRONG&gt;&amp;nbsp;format and your&amp;nbsp;&lt;STRONG&gt;expected result&lt;/STRONG&gt;&amp;nbsp;with backend logic and special examples.&amp;nbsp;&lt;STRONG&gt;It is better&lt;/STRONG&gt;&amp;nbsp;if you can share a&amp;nbsp;&lt;STRONG&gt;simplified&lt;/STRONG&gt;&amp;nbsp;pbix file.&amp;nbsp;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post  &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution &lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2023 02:13:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Days-Between/m-p/3262904#M120716</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-06-01T02:13:41Z</dc:date>
    </item>
    <item>
      <title>Re: Days Between</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Days-Between/m-p/3263083#M120725</link>
      <description>&lt;P&gt;daysbetween =&lt;/P&gt;&lt;P&gt;VAR maxdate = MAX([Delivery Date])&lt;/P&gt;&lt;P&gt;RETURN&lt;/P&gt;&lt;P&gt;&amp;nbsp;DATEDIFF(TODAY(),maxdate,DAY)&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2023 05:23:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Days-Between/m-p/3263083#M120725</guid>
      <dc:creator>devanshi</dc:creator>
      <dc:date>2023-06-01T05:23:51Z</dc:date>
    </item>
  </channel>
</rss>

