<?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: Calculate the Inventory $ of the Last Week in Previous Month in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-Inventory-of-the-Last-Week-in-Previous-Month/m-p/3638124#M140802</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="478644" data-lia-user-login="saurabhtd" class="lia-mention lia-mention-user"&gt;saurabhtd&lt;/a&gt;&amp;nbsp;your method works perfect! Thanks and have already accepted as solution. Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 15 Jan 2024 04:26:50 GMT</pubDate>
    <dc:creator>felixzhao123</dc:creator>
    <dc:date>2024-01-15T04:26:50Z</dc:date>
    <item>
      <title>Calculate the Inventory $ of the Last Week in Previous Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-Inventory-of-the-Last-Week-in-Previous-Month/m-p/3638115#M140800</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a dataset which includes weekly inventory data of my company. I would like to compare latest inventory $ against the end of last month. However, normally there are four weeks data in previous month, and i would like to use the last week's data in previous month as the ending inventory $. A short example would be as below:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The latest inventory $ is Jan 10 2024 and i would like to get the inventory of Dec 27 2023 inventory $ even though there is another week (Dec 20).&lt;/P&gt;&lt;P&gt;How can i achieve this with DAX?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Felix&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2024 03:57:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-Inventory-of-the-Last-Week-in-Previous-Month/m-p/3638115#M140800</guid>
      <dc:creator>felixzhao123</dc:creator>
      <dc:date>2024-01-15T03:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the Inventory $ of the Last Week in Previous Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-Inventory-of-the-Last-Week-in-Previous-Month/m-p/3638119#M140801</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="131478" data-lia-user-login="felixzhao123" class="lia-mention lia-mention-user"&gt;felixzhao123&lt;/a&gt;&amp;nbsp; Here is the DAX logic which might work in your case.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Inventory Last Week in Previous Month = 
VAR CurrentDate = TODAY()
VAR LastWeekPreviousMonth = 
    CALCULATE(
        MAX('Table'[Data Cut-off Date]),
        FILTER(
            ALL('Table'),
            MONTH('Table'[Data Cut-off Date]) = MONTH(EOMONTH(CurrentDate, -1))
            &amp;amp;&amp;amp; YEAR('Table'[Data Cut-off Date]) = YEAR(EOMONTH(CurrentDate, -1))
        )
    )
RETURN
    CALCULATE(
        SUM('Table'[Sum of Inv USS]),
        'Table'[Data Cut-off Date] = LastWeekPreviousMonth
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2024 04:11:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-Inventory-of-the-Last-Week-in-Previous-Month/m-p/3638119#M140801</guid>
      <dc:creator>saurabhtd</dc:creator>
      <dc:date>2024-01-15T04:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the Inventory $ of the Last Week in Previous Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-Inventory-of-the-Last-Week-in-Previous-Month/m-p/3638124#M140802</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="478644" data-lia-user-login="saurabhtd" class="lia-mention lia-mention-user"&gt;saurabhtd&lt;/a&gt;&amp;nbsp;your method works perfect! Thanks and have already accepted as solution. Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2024 04:26:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-Inventory-of-the-Last-Week-in-Previous-Month/m-p/3638124#M140802</guid>
      <dc:creator>felixzhao123</dc:creator>
      <dc:date>2024-01-15T04:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the Inventory $ of the Last Week in Previous Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-Inventory-of-the-Last-Week-in-Previous-Month/m-p/3638127#M140804</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="131478" data-lia-user-login="felixzhao123" class="lia-mention lia-mention-user"&gt;felixzhao123&lt;/a&gt;&amp;nbsp;You are welcome.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2024 04:30:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-Inventory-of-the-Last-Week-in-Previous-Month/m-p/3638127#M140804</guid>
      <dc:creator>saurabhtd</dc:creator>
      <dc:date>2024-01-15T04:30:02Z</dc:date>
    </item>
  </channel>
</rss>

