<?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 changes between dates for various data categories in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-changes-between-dates-for-various-data-categories/m-p/2713197#M82481</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp; and thank you for your suggestion. I will do it. Will be still struggling with the DAX though &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Aug 2022 17:14:49 GMT</pubDate>
    <dc:creator>Petanek333</dc:creator>
    <dc:date>2022-08-19T17:14:49Z</dc:date>
    <item>
      <title>Calculate changes between dates for various data categories</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-changes-between-dates-for-various-data-categories/m-p/2712968#M82473</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table like this.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;and a date slicer&amp;nbsp;&lt;SPAN&gt;'Calendar'[Dates]&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is data about stock movement in the table StockTable.&lt;/P&gt;&lt;P&gt;Column "Type" is for&amp;nbsp;distinguishing between increase (1) and decrease (2) of stock.&lt;/P&gt;&lt;P&gt;I have several IDs and Warehouses (those are two data categories I want to analyze).&lt;/P&gt;&lt;P&gt;Column "Quantity" represents the amount of stock that has increased or decreased.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Finally column "Current stock" represents the value of stock after the change.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am struggling with the DAX expressions for the following views: (I suppose more than one DAX formula will be necessary)&lt;/P&gt;&lt;P&gt;With this slicer selection...&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;...I want to see this (obviously the the column names don't have to include the selected dates)&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;There are some key points:&amp;nbsp;&lt;/P&gt;&lt;P&gt;- the formula has to find the nearest earlier date in order to get a stock value for that date (for both starting and ending date)&lt;/P&gt;&lt;P&gt;- it has to distinguish between decrease and increase by the "Type" column as there are absolute values (or should I use the calculated column instead?)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...and of course the same for the Warehouse as there are several ID-Warehouse combinations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me with the DAX expression please?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2022 15:37:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-changes-between-dates-for-various-data-categories/m-p/2712968#M82473</guid>
      <dc:creator>Petanek333</dc:creator>
      <dc:date>2022-08-19T15:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate changes between dates for various data categories</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-changes-between-dates-for-various-data-categories/m-p/2713041#M82475</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="357508" data-lia-user-login="Petanek333" class="lia-mention lia-mention-user"&gt;Petanek333&lt;/a&gt;&amp;nbsp;- I would like to suggest simplifying the DAX by changing the way you import the data.&amp;nbsp; This would involve removing the "Type" (increase / decrease) and changing the Quantity to +/-.&amp;nbsp; Now the DAX would simply add the quantity movements between the required dates.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2022 16:18:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-changes-between-dates-for-various-data-categories/m-p/2713041#M82475</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-19T16:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate changes between dates for various data categories</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-changes-between-dates-for-various-data-categories/m-p/2713197#M82481</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp; and thank you for your suggestion. I will do it. Will be still struggling with the DAX though &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2022 17:14:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-changes-between-dates-for-various-data-categories/m-p/2713197#M82481</guid>
      <dc:creator>Petanek333</dc:creator>
      <dc:date>2022-08-19T17:14:49Z</dc:date>
    </item>
  </channel>
</rss>

