<?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 Help- How to calculate the date when Demanded quantity will be fulfilled. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Help-How-to-calculate-the-date-when-Demanded-quantity-will/m-p/1863232#M39934</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291628" data-lia-user-login="Jihwan_Kim" class="lia-mention lia-mention-user"&gt;Jihwan_Kim&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 25 May 2021 18:29:12 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-05-25T18:29:12Z</dc:date>
    <item>
      <title>Dax Help- How to calculate the date when Demanded quantity will be fulfilled.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Help-How-to-calculate-the-date-when-Demanded-quantity-will/m-p/1861240#M39875</link>
      <description>&lt;P&gt;Hi , I'm trying to return a date when Demand Quantity will be fulfilled by looking at the Onhand quantity. The data I have is future Projection data for planning. Here's sample dataset;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;so for 5/24 demand quantity is 670k and Onhand quanity is 3.5M so the demand can be met on the same week so the return date should be 5/24.&amp;nbsp; for 5/31 demand is 12M and Onhand is 3.6 so it cannot be fulfilled by 5/31 so I need to check the next date which is 6/7 it has 4.9 M so far cummulative sum for Onhand is 8.5 and it cannot still be fulfilled so have to go to next date 6/14 it has 5.4M so by summing cumulatively 6/14 week will fulfill the demand. I need to calculate all such dates for all the records.&amp;nbsp;&lt;BR /&gt;Here's the sample resultset.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;current record should not look back previous records data, it should be all current and next records.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 01:29:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Help-How-to-calculate-the-date-when-Demanded-quantity-will/m-p/1861240#M39875</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-25T01:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Help- How to calculate the date when Demanded quantity will be fulfilled.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Help-How-to-calculate-the-date-when-Demanded-quantity-will/m-p/1861445#M39887</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure if I understood your question correctly, but please check the below picture and the sample pbix file's link down below.&lt;/P&gt;&lt;P&gt;- I tried to create a sample pbix file by simplifying the sample above.&lt;/P&gt;&lt;P&gt;- All measures are in the sample pbix file, and all steps are numbered in front of each measure.&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;DIV&gt;&lt;DIV&gt;&lt;EM&gt;&lt;STRONG&gt;5 Result Measure =&lt;/STRONG&gt; &lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;VAR currentdemandcumulate = [3 demand cumulate]&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;VAR newtable =&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;FILTER (&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;SUMMARIZE (&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;ALL ( 'Table' ),&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;'Table'[RetailWeekBeginDate],&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;"@onhandcumulate", [4 onhand cumulate]&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;),&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;[4 onhand cumulate] &amp;gt;= currentdemandcumulate&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;RETURN&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;IF (&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;[1 demand total] &amp;lt;= [2 onhand total],&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;SELECTEDVALUE ( 'Table'[RetailWeekBeginDate] ),&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;MINX ( newtable, 'Table'[RetailWeekBeginDate] )&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;A href="https://www.dropbox.com/s/807g5mqqyrze4jz/srikanthk.pbix?dl=0" target="_self"&gt;https://www.dropbox.com/s/807g5mqqyrze4jz/srikanthk.pbix?dl=0&lt;/A&gt;&amp;nbsp;&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;&lt;FONT face="”calibri" color="”#0000FF”"&gt;&lt;STRONG&gt;Hi, My name is Jihwan Kim. &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;FONT face="”calibri" color="”#0000FF”"&gt;&lt;STRONG&gt;If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up. &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;FONT face="”calibri" color="”#0000FF”"&gt;Linkedin: linkedin.com/in/jihwankim1975/&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="”calibri" color="”#0000FF”"&gt;Twitter: twitter.com/Jihwan_JHKIM&lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 25 May 2021 04:22:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Help-How-to-calculate-the-date-when-Demanded-quantity-will/m-p/1861445#M39887</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2021-05-25T04:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Help- How to calculate the date when Demanded quantity will be fulfilled.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Help-How-to-calculate-the-date-when-Demanded-quantity-will/m-p/1863117#M39926</link>
      <description>&lt;P&gt;so for Retailweekbegin date 6/28/2021 the deamd is 10,641 where as OnHand is only 5420 the demand cannot be fulfilled on that week ( 10641-5420=5221). The remaining demand 5221 can be fulfilled in the next week 7/5/2021 the 5 Result Measure should return 7/5/2021 as date.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 17:00:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Help-How-to-calculate-the-date-when-Demanded-quantity-will/m-p/1863117#M39926</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-25T17:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Help- How to calculate the date when Demanded quantity will be fulfilled.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Help-How-to-calculate-the-date-when-Demanded-quantity-will/m-p/1863232#M39934</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291628" data-lia-user-login="Jihwan_Kim" class="lia-mention lia-mention-user"&gt;Jihwan_Kim&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 18:29:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Help-How-to-calculate-the-date-when-Demanded-quantity-will/m-p/1863232#M39934</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-25T18:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Help- How to calculate the date when Demanded quantity will be fulfilled.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Help-How-to-calculate-the-date-when-Demanded-quantity-will/m-p/1863726#M39943</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please check the link down below.&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;&lt;STRONG&gt;&lt;EM&gt;5 Result Measure =&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;EM&gt;VAR currentdemand = [1 demand total]&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;VAR currentdate =&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;MAX ( 'Table'[RetailWeekBeginDate] )&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;VAR newtable =&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;FILTER (&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;SUMMARIZE (&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;FILTER ( ALL ( 'Table' ), 'Table'[RetailWeekBeginDate] &amp;gt;= currentdate ),&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;'Table'[RetailWeekBeginDate],&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;'Table'[onhand],&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"@onhandcumulate",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;SUMX (&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;FILTER (&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;ALL ( 'Table' ),&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;'Table'[RetailWeekBeginDate] &amp;gt;= currentdate&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;amp;&amp;amp; 'Table'[RetailWeekBeginDate] &amp;lt;= MAX ( 'Table'[RetailWeekBeginDate] )&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;),&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;'Table'[onhand]&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;),&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[@onhandcumulate] &amp;gt; currentdemand&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;VAR mindateoverdemand =&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;MINX ( newtable, 'Table'[RetailWeekBeginDate] )&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;RETURN&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;IF (&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[1 demand total] &amp;lt;= [2 onhand total],&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;SELECTEDVALUE ( 'Table'[RetailWeekBeginDate] ),&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;mindateoverdemand&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.dropbox.com/s/807g5mqqyrze4jz/srikanthk.pbix?dl=0" target="_self"&gt;https://www.dropbox.com/s/807g5mqqyrze4jz/srikanthk.pbix?dl=0&lt;/A&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;&lt;FONT face="”calibri" color="”#0000FF”"&gt;&lt;STRONG&gt;Hi, My name is Jihwan Kim. &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="”calibri" color="”#0000FF”"&gt;&lt;STRONG&gt;If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up. &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="”calibri" color="”#0000FF”"&gt;Linkedin: linkedin.com/in/jihwankim1975/&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="”calibri" color="”#0000FF”"&gt;Twitter: twitter.com/Jihwan_JHKIM&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 03:35:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Help-How-to-calculate-the-date-when-Demanded-quantity-will/m-p/1863726#M39943</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2021-05-26T03:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Help- How to calculate the date when Demanded quantity will be fulfilled.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Help-How-to-calculate-the-date-when-Demanded-quantity-will/m-p/1868307#M40023</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291628" data-lia-user-login="Jihwan_Kim" class="lia-mention lia-mention-user"&gt;Jihwan_Kim&lt;/a&gt;&amp;nbsp;That exactly what I'm looking for but it doesn't work on my model. Running into memory issues the table has 800M records.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 May 2021 17:48:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Help-How-to-calculate-the-date-when-Demanded-quantity-will/m-p/1868307#M40023</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-27T17:48:13Z</dc:date>
    </item>
  </channel>
</rss>

