<?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 calculate the stock total between the current line date and first purchase date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-the-stock-total-between-the-current-line-date-and/m-p/2773942#M86485</link>
    <description>&lt;P&gt;I try with calculated but it doesn't work, can I have some help&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 15:24:35 GMT</pubDate>
    <dc:creator>Hamdi-FAKHFAKH</dc:creator>
    <dc:date>2022-09-16T15:24:35Z</dc:date>
    <item>
      <title>calculate the stock total between the current line date and first purchase date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-the-stock-total-between-the-current-line-date-and/m-p/2773942#M86485</link>
      <description>&lt;P&gt;I try with calculated but it doesn't work, can I have some help&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 15:24:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-the-stock-total-between-the-current-line-date-and/m-p/2773942#M86485</guid>
      <dc:creator>Hamdi-FAKHFAKH</dc:creator>
      <dc:date>2022-09-16T15:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: calculate the stock total between the current line date and first purchase date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-the-stock-total-between-the-current-line-date-and/m-p/2774140#M86499</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="443111" data-lia-user-login="Hamdi-FAKHFAKH" class="lia-mention lia-mention-user"&gt;Hamdi-FAKHFAKH&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Try to replace BLANK ( ) with MIN ( [Date] )&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 17:02:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-the-stock-total-between-the-current-line-date-and/m-p/2774140#M86499</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-09-16T17:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: calculate the stock total between the current line date and first purchase date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-the-stock-total-between-the-current-line-date-and/m-p/2774150#M86502</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;I already try the same problem&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 17:06:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-the-stock-total-between-the-current-line-date-and/m-p/2774150#M86502</guid>
      <dc:creator>Hamdi-FAKHFAKH</dc:creator>
      <dc:date>2022-09-16T17:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: calculate the stock total between the current line date and first purchase date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-the-stock-total-between-the-current-line-date-and/m-p/2774167#M86506</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="443111" data-lia-user-login="Hamdi-FAKHFAKH" class="lia-mention lia-mention-user"&gt;Hamdi-FAKHFAKH&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Use&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;=
CALCULATE (
    SUM ( 'Table'[Column] ),
    'Table'[Date] &amp;lt;= EARLIER ( 'Table'[Date] ),
    ALL ( 'Table' )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 16 Sep 2022 17:15:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-the-stock-total-between-the-current-line-date-and/m-p/2774167#M86506</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-09-16T17:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: calculate the stock total between the current line date and first purchase date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-the-stock-total-between-the-current-line-date-and/m-p/2774363#M86525</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;the same problem &lt;span class="lia-unicode-emoji" title=":pensive_face:"&gt;😔&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 18:44:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-the-stock-total-between-the-current-line-date-and/m-p/2774363#M86525</guid>
      <dc:creator>Hamdi-FAKHFAKH</dc:creator>
      <dc:date>2022-09-16T18:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: calculate the stock total between the current line date and first purchase date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-the-stock-total-between-the-current-line-date-and/m-p/2774390#M86528</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="443111" data-lia-user-login="Hamdi-FAKHFAKH" class="lia-mention lia-mention-user"&gt;Hamdi-FAKHFAKH&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Sorry for that. Please try&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;=
VAR CurrentDate = 'Table'[Date]
VAR T1 =
    FILTER ( 'Table', 'Table'[Date] &amp;lt;= CurrentDate )
RETURN
    SUMX ( T1, 'Table'[Column] )&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 16 Sep 2022 18:55:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-the-stock-total-between-the-current-line-date-and/m-p/2774390#M86528</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-09-16T18:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: calculate the stock total between the current line date and first purchase date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-the-stock-total-between-the-current-line-date-and/m-p/2776567#M86706</link>
      <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="443111" data-lia-user-login="Hamdi-FAKHFAKH" class="lia-mention lia-mention-user"&gt;Hamdi-FAKHFAKH&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;1. Create calculated column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Total stock = 
var _mindate=MINX(FILTER(ALL('Table'),'Table'[somme des achats]=EARLIER('Table'[somme des achats])), 'Table'[DATE])
var _currentdate='Table'[DATE]
return
SUMX( 
    FILTER(ALL('Table'),
    'Table'[DATE]&amp;gt;=_mindate&amp;amp;&amp;amp;'Table'[DATE]&amp;lt;=EARLIER('Table'[DATE])
    &amp;amp;&amp;amp;
    'Table'[somme des achats]=EARLIER('Table'[somme des achats])
    ),[somme des achats])
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 00:41:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-the-stock-total-between-the-current-line-date-and/m-p/2776567#M86706</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-29T00:41:52Z</dc:date>
    </item>
  </channel>
</rss>

