<?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: Cumulative amount calculation excluding expired dates in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-amount-calculation-excluding-expired-dates/m-p/3304809#M123407</link>
    <description>&lt;P&gt;Hi Jihwan_Kim,&amp;nbsp;thank you very much for your reply :), unfortunately only the volume 92 of 10 June is correct, and we see this number for every day, which is not good. But for 9 June the correct value is 71, for 8 June: 67 and for 7 June: 26 is the correct.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Jun 2023 17:20:14 GMT</pubDate>
    <dc:creator>streli</dc:creator>
    <dc:date>2023-06-27T17:20:14Z</dc:date>
    <item>
      <title>Cumulative amount calculation excluding expired dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-amount-calculation-excluding-expired-dates/m-p/3301064#M123130</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a data table with 3 colums: DataDay, UnitsSold, ExpiryDate.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to calculate cumulative amount for the units sold, but exclude from the calculation where above ExpiryDate &amp;lt; DataDay, so I would like to see 8 instead of 11 for the DataDay of June 10, since June 9 is an earlier date than June 10.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;It is very important that someone can help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much!!!&lt;/P&gt;</description>
      <pubDate>Sun, 25 Jun 2023 12:31:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-amount-calculation-excluding-expired-dates/m-p/3301064#M123130</guid>
      <dc:creator>streli</dc:creator>
      <dc:date>2023-06-25T12:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative amount calculation excluding expired dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-amount-calculation-excluding-expired-dates/m-p/3301070#M123131</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am not sure how your datamodel looks like, but I tried to create a sample pbix file like below.&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 measure and a visualization.&lt;BR /&gt;I hope the below can provide some ideas on how to create a solution for your datamodel.&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;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Expected result measure: =
VAR _currentdate =
    MAX ( 'Calendar'[Date] )
VAR _expirydate =
    SUMMARIZE (
        FILTER ( ALL ( Data ), Data[ExpiryDate] &amp;gt;= _currentdate ),
        'Calendar'[Date]
    )
RETURN
    CALCULATE (
        SUM ( Data[UnitSold] ),
        WINDOW ( 1, ABS, 0, REL, _expirydate, ORDERBY ( 'Calendar'[Date], ASC ) )
    )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Jun 2023 13:08:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-amount-calculation-excluding-expired-dates/m-p/3301070#M123131</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2023-06-25T13:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative amount calculation excluding expired dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-amount-calculation-excluding-expired-dates/m-p/3301153#M123138</link>
      <description>&lt;P&gt;Hello, thank you very much for your reply :), I will let you know if it works.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Jun 2023 17:03:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-amount-calculation-excluding-expired-dates/m-p/3301153#M123138</guid>
      <dc:creator>streli</dc:creator>
      <dc:date>2023-06-25T17:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative amount calculation excluding expired dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-amount-calculation-excluding-expired-dates/m-p/3302433#M123245</link>
      <description>&lt;P&gt;Hi Jihwan_Kim, unfortunately I can't attach a .pbix file, but I'm trying to show you that I failed:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, the DAX formula included the 10 volumes of June 7 (expiry date June 8 ) and the 10 volumes of June 8 ( expiry date June 8 ) in the sum of June 9, although it should not have done so, because the rule is to exclude if expiry date &amp;lt; dataday...&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 13:21:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-amount-calculation-excluding-expired-dates/m-p/3302433#M123245</guid>
      <dc:creator>streli</dc:creator>
      <dc:date>2023-06-26T13:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative amount calculation excluding expired dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-amount-calculation-excluding-expired-dates/m-p/3304693#M123401</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Could you please check the below measure, just in case if I understood your question correctly?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Expected result measure: =
VAR _currentdate =
    MAX ( 'Calendar'[Date] )
VAR _expirydate =
    FILTER ( ALL ( Data ), Data[ExpiryDate] &amp;gt;= _currentdate )
RETURN
    IF (
        NOT ISBLANK ( [Unit sold measure:] ),
        SUMX ( FILTER ( _expirydate, Data[Date] &amp;lt;= _currentdate ), Data[UnitSold] )
    )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2023 15:53:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-amount-calculation-excluding-expired-dates/m-p/3304693#M123401</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2023-06-27T15:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative amount calculation excluding expired dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-amount-calculation-excluding-expired-dates/m-p/3304809#M123407</link>
      <description>&lt;P&gt;Hi Jihwan_Kim,&amp;nbsp;thank you very much for your reply :), unfortunately only the volume 92 of 10 June is correct, and we see this number for every day, which is not good. But for 9 June the correct value is 71, for 8 June: 67 and for 7 June: 26 is the correct.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2023 17:20:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-amount-calculation-excluding-expired-dates/m-p/3304809#M123407</guid>
      <dc:creator>streli</dc:creator>
      <dc:date>2023-06-27T17:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative amount calculation excluding expired dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-amount-calculation-excluding-expired-dates/m-p/3305017#M123421</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please open the file that I have attached in my last reply.&lt;/P&gt;
&lt;P&gt;And in my opnion, I think your visualizatoin is using Date from Data table, but Date has to be from Calendar table.&lt;BR /&gt;Just in case, I am attaching the file again.&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2023 19:14:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-amount-calculation-excluding-expired-dates/m-p/3305017#M123421</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2023-06-27T19:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative amount calculation excluding expired dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-amount-calculation-excluding-expired-dates/m-p/3305061#M123425</link>
      <description>&lt;P&gt;hi Jihwan_Kim, you are right, it works and thank you very much!!! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2023 19:45:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-amount-calculation-excluding-expired-dates/m-p/3305061#M123425</guid>
      <dc:creator>streli</dc:creator>
      <dc:date>2023-06-27T19:45:36Z</dc:date>
    </item>
  </channel>
</rss>

