<?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: Calculation of retroactive values ​​using DAX in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculation-of-retroactive-values-using-DAX/m-p/1974762#M43448</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="315197" data-lia-user-login="julianomachado4" class="lia-mention lia-mention-user"&gt;julianomachado4&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can try below code:-&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Medida =
VAR _selected_date =
    SELECTEDVALUE ( CARTOES[DATAVENDA] )
RETURN
    CALCULATE (
        SUM ( CARTOES[VALOR] ),
        CARTOES[DATAVENDA] &amp;lt;= _selected_date
            &amp;amp;&amp;amp; (
                CARTOES[retirement_date] &amp;gt;= _selected_date
                    || ISBLANK ( CARTOES[retirement_date] )
            )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would be more helpful if you could share some sample data and snapshot of expected output. Kindly share if above code not help you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
    <pubDate>Fri, 23 Jul 2021 05:47:06 GMT</pubDate>
    <dc:creator>Samarth_18</dc:creator>
    <dc:date>2021-07-23T05:47:06Z</dc:date>
    <item>
      <title>Calculation of retroactive values ​​using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculation-of-retroactive-values-using-DAX/m-p/1973951#M43419</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm new to the field, and I'm in need of some help. It can be a simple question. I need to calculate the total amount of retroactive card sales, like for example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I select the day 12/31/2020 they must list (add up) the sales that issued &amp;lt;= 12/31/2020 in which the retirement date is greater than 12/31/2020 or is blank.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 17:59:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculation-of-retroactive-values-using-DAX/m-p/1973951#M43419</guid>
      <dc:creator>julianomachado4</dc:creator>
      <dc:date>2021-07-22T17:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation of retroactive values ​​using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculation-of-retroactive-values-using-DAX/m-p/1974762#M43448</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="315197" data-lia-user-login="julianomachado4" class="lia-mention lia-mention-user"&gt;julianomachado4&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can try below code:-&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Medida =
VAR _selected_date =
    SELECTEDVALUE ( CARTOES[DATAVENDA] )
RETURN
    CALCULATE (
        SUM ( CARTOES[VALOR] ),
        CARTOES[DATAVENDA] &amp;lt;= _selected_date
            &amp;amp;&amp;amp; (
                CARTOES[retirement_date] &amp;gt;= _selected_date
                    || ISBLANK ( CARTOES[retirement_date] )
            )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would be more helpful if you could share some sample data and snapshot of expected output. Kindly share if above code not help you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jul 2021 05:47:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculation-of-retroactive-values-using-DAX/m-p/1974762#M43448</guid>
      <dc:creator>Samarth_18</dc:creator>
      <dc:date>2021-07-23T05:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation of retroactive values ​​using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculation-of-retroactive-values-using-DAX/m-p/1979952#M43631</link>
      <description>&lt;P&gt;Oi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="312802" data-lia-user-login="Samarth_18" class="lia-mention lia-mention-user"&gt;Samarth_18&lt;/a&gt;&amp;nbsp;, alright?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the answer, I'll detail how the expected output should be:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;In this small table, if the sale date (column 4) I select is, for example, 12/31/2020, the expected result should be: $50.00. Because the day 01/04/2021 is greater than 12/31/2020... or if it is blank, it should also bring the same $50.00.&lt;BR /&gt;&lt;BR /&gt;In this image, if I selected the sale date = 12/30/2020 the expected result would be $ 470,07&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&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;</description>
      <pubDate>Mon, 26 Jul 2021 16:02:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculation-of-retroactive-values-using-DAX/m-p/1979952#M43631</guid>
      <dc:creator>julianomachado4</dc:creator>
      <dc:date>2021-07-26T16:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation of retroactive values ​​using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculation-of-retroactive-values-using-DAX/m-p/1981042#M43679</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="315197" data-lia-user-login="julianomachado4" class="lia-mention lia-mention-user"&gt;julianomachado4&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below code will help to get your desired result.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;_Medida = 
VAR _selected_date =
    SELECTEDVALUE ( _CARTOES[DATAVENDA] )
RETURN
    CALCULATE (
        SUM ( _CARTOES[VALOR] ),
        _CARTOES[DATAVENDA] &amp;lt;= _selected_date
            &amp;amp;&amp;amp; (
                _CARTOES[DATABAIXA] &amp;gt; _selected_date
                    || ISBLANK ( _CARTOES[DATABAIXA] )
            )
    )&lt;/LI-CODE&gt;&lt;P&gt;My data table:-&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Test case 1 with 31 dec as selected date:-&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Test case 2 with 30 dec as selected date&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Samarth&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jul 2021 05:38:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculation-of-retroactive-values-using-DAX/m-p/1981042#M43679</guid>
      <dc:creator>Samarth_18</dc:creator>
      <dc:date>2021-07-27T05:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation of retroactive values ​​using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculation-of-retroactive-values-using-DAX/m-p/2010503#M44679</link>
      <description>&lt;P&gt;It was right, thank you very much for your help and sorry for the delay in replying.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Aug 2021 12:26:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculation-of-retroactive-values-using-DAX/m-p/2010503#M44679</guid>
      <dc:creator>julianomachado4</dc:creator>
      <dc:date>2021-08-11T12:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation of retroactive values ​​using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculation-of-retroactive-values-using-DAX/m-p/2012409#M44725</link>
      <description>&lt;P&gt;Thats greats, &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="315197" data-lia-user-login="julianomachado4" class="lia-mention lia-mention-user"&gt;julianomachado4&lt;/a&gt;! Kindly marked this answer as a solution so that it will helps other to find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 07:53:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculation-of-retroactive-values-using-DAX/m-p/2012409#M44725</guid>
      <dc:creator>Samarth_18</dc:creator>
      <dc:date>2021-08-12T07:53:18Z</dc:date>
    </item>
  </channel>
</rss>

