<?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: How to calculate the ending inventory with cumulative inventory movement value in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-the-ending-inventory-with-cumulative-inventory/m-p/1388345#M25400</link>
    <description>&lt;P&gt;Thanks Sir for your inputs! Just send private message to you to see whether you have time to look at my table setting. Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 22 Sep 2020 20:39:15 GMT</pubDate>
    <dc:creator>naoyixue1</dc:creator>
    <dc:date>2020-09-22T20:39:15Z</dc:date>
    <item>
      <title>How to calculate the ending inventory with cumulative inventory movement value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-the-ending-inventory-with-cumulative-inventory/m-p/1385944#M25344</link>
      <description>&lt;P&gt;Hey there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a problem to calculate the ending inventory at below format (Row = item, column = month, value = demands, WorkOrder, On Hand Inv)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Inventory movement = Work Order qty + On hand inventory - demands&lt;/P&gt;&lt;P&gt;The ending inventory =&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;CALCULATE(CALCULATE([Movement],FILTER(ALLSELECTED('Fact'),'Fact'[Date]&amp;lt;=MAX('Fact'[Date]))))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But it works when i only put the date in the row, but not correct when i put item in row, and month in the column. (see below). I think i might also add some dax such as allselected to item level. Would you kindly help? Thanks a lot!&amp;nbsp;&lt;img /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 03:28:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-the-ending-inventory-with-cumulative-inventory/m-p/1385944#M25344</guid>
      <dc:creator>naoyixue1</dc:creator>
      <dc:date>2020-09-22T03:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the ending inventory with cumulative inventory movement value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-the-ending-inventory-with-cumulative-inventory/m-p/1386014#M25345</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="259789" data-lia-user-login="naoyixue1" class="lia-mention lia-mention-user"&gt;naoyixue1&lt;/a&gt; , in such case, you should have date in a separate table. Like date table. so all/ allselected on the date table will not impact relation with item &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The ending inventory = CALCULATE(CALCULATE([Movement],FILTER(ALLSELECTED('Date'),'Date'[Date]&amp;lt;=MAX('Date'[Date]))))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also think it should be like&lt;/P&gt;
&lt;P&gt;Inventory movement = Work Order qty - demands&lt;/P&gt;
&lt;P&gt;The ending inventory = [intial On hand inventory]+ CALCULATE(CALCULATE([Movement],FILTER(ALLSELECTED('Date'),'Date'[Date]&amp;lt;=MAX('Date'[Date]))))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;initial On hand inventory; inventory on the start date &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer : &lt;BR /&gt;&lt;A href="https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions" target="_blank"&gt;https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;Appreciate your Kudos.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 04:29:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-the-ending-inventory-with-cumulative-inventory/m-p/1386014#M25345</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-09-22T04:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the ending inventory with cumulative inventory movement value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-the-ending-inventory-with-cumulative-inventory/m-p/1388345#M25400</link>
      <description>&lt;P&gt;Thanks Sir for your inputs! Just send private message to you to see whether you have time to look at my table setting. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 20:39:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-the-ending-inventory-with-cumulative-inventory/m-p/1388345#M25400</guid>
      <dc:creator>naoyixue1</dc:creator>
      <dc:date>2020-09-22T20:39:15Z</dc:date>
    </item>
  </channel>
</rss>

