<?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 Inventory Days Using DAX in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Calculate-Inventory-Days-Using-DAX/m-p/1879983#M40376</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , I am not able to get you formula completely. So I am giving measures you may need to get that with help from date table and time intelligence &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;example&lt;/P&gt;
&lt;P&gt;MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))&lt;BR /&gt;&lt;BR /&gt;last year MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-12,MONTH)))&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Rolling 2 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-2,MONTH)) &lt;BR /&gt;&lt;BR /&gt;Days of last three month = day(eomonth(today(),0)) + day(eomonth(today(),-1)) + day(eomonth(today(),-2))&lt;/P&gt;</description>
    <pubDate>Thu, 03 Jun 2021 10:53:47 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2021-06-03T10:53:47Z</dc:date>
    <item>
      <title>How to Calculate Inventory Days Using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Calculate-Inventory-Days-Using-DAX/m-p/1879882#M40365</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to using Power BI and DAX functions. Appreciate if anyone could help me with this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to calculate the Inventory Day of a list of materials (also categorise by MRP) based on the Inventory value captured at month end closing. For example, in end of May'21, the sum of Inventory value under category 1RL is $3170. I have the COGS record for the last 6 months (posting period 12, 1.. 5). So the calculation of Inventory Days = ($3170-$1451-$1489)/$1743*31days+30days+31days = 65 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;&lt;P&gt;This is my Inventory Table and COGS Table in power BI.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need the Inventory Days for each material as well as each MRP.&lt;/P&gt;&lt;P&gt;Appreciate any help, thanks in advance !&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;&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, 03 Jun 2021 09:49:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Calculate-Inventory-Days-Using-DAX/m-p/1879882#M40365</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-03T09:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to Calculate Inventory Days Using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Calculate-Inventory-Days-Using-DAX/m-p/1879983#M40376</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , I am not able to get you formula completely. So I am giving measures you may need to get that with help from date table and time intelligence &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;example&lt;/P&gt;
&lt;P&gt;MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))&lt;BR /&gt;&lt;BR /&gt;last year MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-12,MONTH)))&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Rolling 2 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-2,MONTH)) &lt;BR /&gt;&lt;BR /&gt;Days of last three month = day(eomonth(today(),0)) + day(eomonth(today(),-1)) + day(eomonth(today(),-2))&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 10:53:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Calculate-Inventory-Days-Using-DAX/m-p/1879983#M40376</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-06-03T10:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to Calculate Inventory Days Using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Calculate-Inventory-Days-Using-DAX/m-p/1880083#M40387</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;, first of all thanks for the help, much appreciated !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The purpose of calculating the Inventory Days is to understand how many days of stocks we are holding versus the previous months COGS.&amp;nbsp; As you can see below, the coverage of the Inventory could varies instead of a fix 3 months. Example, for 1RL inventory it covers about 2 months+ (65 Days), for 4RL inventory it covers about 5 months (150 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;&lt;P&gt;I have added a Date table in my power BI and an example file link attached.&amp;nbsp;&lt;SPAN&gt;I would love for your help here with the formula. Thanks once again.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PBIX file:&amp;nbsp;&lt;A href="https://drive.google.com/file/d/1doO1tsVJas4WinqOevgF80dOxQkMxNUt/view?usp=sharing" target="_self"&gt;https://drive.google.com/file/d/1doO1tsVJas4WinqOevgF80dOxQkMxNUt/view?usp=sharing&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 12:00:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Calculate-Inventory-Days-Using-DAX/m-p/1880083#M40387</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-03T12:00:42Z</dc:date>
    </item>
  </channel>
</rss>

