<?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 Calculated Column Creation for Inventory Tracking in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculated-Column-Creation-for-Inventory-Tracking/m-p/3698472#M143851</link>
    <description>&lt;P&gt;Thank you, this worked!&lt;/P&gt;</description>
    <pubDate>Wed, 14 Feb 2024 10:07:52 GMT</pubDate>
    <dc:creator>WILFR3D2K24</dc:creator>
    <dc:date>2024-02-14T10:07:52Z</dc:date>
    <item>
      <title>DAX Calculated Column Creation for Inventory Tracking</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculated-Column-Creation-for-Inventory-Tracking/m-p/3697467#M143786</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I'm currently facing some difficulty in generating a calculated column using DAX, whereas it's relatively straightforward using Excel.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Below is an image displaying a sample of the dataset I'm currently working with:&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;&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;This dataset illustrates the inventory of two products. I'm attempting to monitor the remaining units after each shipment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. The new column, named "Quantity," is what I'm aiming to create using DAX.&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;&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;3. Here is the simple Excel formula that achieves the desired output:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The logic needs to take into consideration there multiple items within Category, so it can't simply substract the shipment/ or add the stock replenishment from the above value, this is where I suspect the CategoryIndex will come in handy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Ideally, I would prefer a solution in DAX. However, if it can be accomplished using M Code, I'm also open to suggestions.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 23:35:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculated-Column-Creation-for-Inventory-Tracking/m-p/3697467#M143786</guid>
      <dc:creator>WILFR3D2K24</dc:creator>
      <dc:date>2024-02-13T23:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Calculated Column Creation for Inventory Tracking</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculated-Column-Creation-for-Inventory-Tracking/m-p/3697922#M143811</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please check the below picture and the attached pbix file.&lt;/P&gt;
&lt;P&gt;It is for creating a new column.&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;A href="https://learn.microsoft.com/en-us/dax/window-function-dax?wt.mc_id=DP-MVP-5004989" target="_blank"&gt;WINDOW function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Quantity CC =
SUMX (
    WINDOW (
        1,
        ABS,
        0,
        REL,
        Data,
        ORDERBY ( Data[CategoryIndex], ASC, Data[Date], ASC ),
        ,
        PARTITIONBY ( Data[Category] ),
        MATCHBY ( Data[CategoryIndex], Data[Date] )
    ),
    Data[Stock Replenishment] + Data[Shipments]
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 04:14:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculated-Column-Creation-for-Inventory-Tracking/m-p/3697922#M143811</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2024-02-14T04:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Calculated Column Creation for Inventory Tracking</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculated-Column-Creation-for-Inventory-Tracking/m-p/3698472#M143851</link>
      <description>&lt;P&gt;Thank you, this worked!&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 10:07:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculated-Column-Creation-for-Inventory-Tracking/m-p/3698472#M143851</guid>
      <dc:creator>WILFR3D2K24</dc:creator>
      <dc:date>2024-02-14T10:07:52Z</dc:date>
    </item>
  </channel>
</rss>

