<?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: Days Between Summed Up in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Days-Between-Summed-Up/m-p/3331183#M124834</link>
    <description>&lt;P&gt;&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; Try with:&lt;BR /&gt;Max Days Between = &lt;BR /&gt;VAR MaxDeliveryDate = MAX('Purchase Orders'[Delivery Date.Delivery Date Level 01])&lt;BR /&gt;RETURN&lt;BR /&gt;IF('Purchase Orders'[Delivery Date.Delivery Date Level 01] = MaxDeliveryDate,&lt;BR /&gt;DATEDIFF(MaxDeliveryDate, TODAY(), DAY),&lt;BR /&gt;BLANK()&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;BBF&lt;/P&gt;</description>
    <pubDate>Fri, 14 Jul 2023 11:49:23 GMT</pubDate>
    <dc:creator>BeaBF</dc:creator>
    <dc:date>2023-07-14T11:49:23Z</dc:date>
    <item>
      <title>Days Between Summed Up</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Days-Between-Summed-Up/m-p/3329965#M124768</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a calculated column where I calcualte the Days between the Max Delivery Date per Purchase Order.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/S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; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;'Purchase Orders'&lt;/SPAN&gt;&lt;SPAN&gt;[Purchase Order #.Purchase Order # Level 01]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; )&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;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;It works fine but when I click "Sum" for the visualization, it starts adding up all the Days Between instead of just summing up the max days between.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;basically in the screen shot, i want it to sum the top left correttly. When i click sumn, the top right is what happens and is incorrect.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The bottom is an example of each purchase order with the delivery date and days between compared to the current Date.&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 18:01:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Days-Between-Summed-Up/m-p/3329965#M124768</guid>
      <dc:creator>amandabus21</dc:creator>
      <dc:date>2023-07-13T18:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: Days Between Summed Up</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Days-Between-Summed-Up/m-p/3330005#M124771</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;try with sumx:&lt;/P&gt;
&lt;P&gt;Max Days Between = &lt;BR /&gt;VAR MaxDeliveryDate = MAX('Purchase Orders'[Delivery Date.Delivery Date Level 01])&lt;BR /&gt;RETURN&lt;BR /&gt;SUMX (&lt;BR /&gt;VALUES('Purchase Orders'[Purchase Order #.Purchase Order # Level 01]),&lt;BR /&gt;CALCULATE (&lt;BR /&gt;DATEDIFF (&lt;BR /&gt;MaxDeliveryDate,&lt;BR /&gt;TODAY(),&lt;BR /&gt;DAY&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;By using Sumx&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;you ensure that only the maximum value for each purchase order is summed up when you apply the sum aggregation in the visual&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;BBF&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 18:59:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Days-Between-Summed-Up/m-p/3330005#M124771</guid>
      <dc:creator>BeaBF</dc:creator>
      <dc:date>2023-07-13T18:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Days Between Summed Up</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Days-Between-Summed-Up/m-p/3330059#M124774</link>
      <description>&lt;P&gt;This kind of works as a measure except is not totaling correctly. When i dump in excel the correct sum is -14,073.&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also is there a way for it to work as a calc column?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 19:59:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Days-Between-Summed-Up/m-p/3330059#M124774</guid>
      <dc:creator>amandabus21</dc:creator>
      <dc:date>2023-07-13T19:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: Days Between Summed Up</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Days-Between-Summed-Up/m-p/3331183#M124834</link>
      <description>&lt;P&gt;&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; Try with:&lt;BR /&gt;Max Days Between = &lt;BR /&gt;VAR MaxDeliveryDate = MAX('Purchase Orders'[Delivery Date.Delivery Date Level 01])&lt;BR /&gt;RETURN&lt;BR /&gt;IF('Purchase Orders'[Delivery Date.Delivery Date Level 01] = MaxDeliveryDate,&lt;BR /&gt;DATEDIFF(MaxDeliveryDate, TODAY(), DAY),&lt;BR /&gt;BLANK()&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;BBF&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 11:49:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Days-Between-Summed-Up/m-p/3331183#M124834</guid>
      <dc:creator>BeaBF</dc:creator>
      <dc:date>2023-07-14T11:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: Days Between Summed Up</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Days-Between-Summed-Up/m-p/3331675#M124866</link>
      <description>&lt;P&gt;That one did not work. Additonally I need a column becuase I need to run IF statements around it.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 17:59:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Days-Between-Summed-Up/m-p/3331675#M124866</guid>
      <dc:creator>amandabus21</dc:creator>
      <dc:date>2023-07-14T17:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: Days Between Summed Up</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Days-Between-Summed-Up/m-p/3331685#M124868</link>
      <description>&lt;P&gt;&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;BR /&gt;Max Days Between =&lt;BR /&gt;VAR CurrentOrder = 'Purchase Orders'[Purchase Order #.Purchase Order # Level 01]&lt;BR /&gt;VAR CurrentDeliveryDate = 'Purchase Orders'[Delivery Date.Delivery Date Level 01]&lt;BR /&gt;VAR MaxDeliveryDate = CALCULATE(MAX('Purchase Orders'[Delivery Date.Delivery Date Level 01]), ALLEXCEPT('Purchase Orders', 'Purchase Orders'[Purchase Order #.Purchase Order # Level 01]))&lt;BR /&gt;RETURN&lt;BR /&gt;IF(CurrentDeliveryDate = MaxDeliveryDate, DATEDIFF(MaxDeliveryDate, TODAY(), DAY), BLANK())&lt;BR /&gt;&lt;BR /&gt;BBF&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 18:04:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Days-Between-Summed-Up/m-p/3331685#M124868</guid>
      <dc:creator>BeaBF</dc:creator>
      <dc:date>2023-07-14T18:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: Days Between Summed Up</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Days-Between-Summed-Up/m-p/3331710#M124873</link>
      <description>&lt;P&gt;Still not working.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example for PO 4500055313 its saying the Sum of Days Between is -108 from 7/26/2023. When it should be -12 Days.&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>Fri, 14 Jul 2023 18:48:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Days-Between-Summed-Up/m-p/3331710#M124873</guid>
      <dc:creator>amandabus21</dc:creator>
      <dc:date>2023-07-14T18:48:45Z</dc:date>
    </item>
  </channel>
</rss>

