<?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 Sum value in previous day that goal is not blank in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-value-in-previous-day-that-goal-is-not-blank/m-p/2676446#M79998</link>
    <description>&lt;P&gt;Hi guys!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I want to sum the quantity sold on a day that my target is blank to the quantity sold on a day immediately before that target has a value.&amp;nbsp;&lt;BR /&gt;The expected result is:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me to do this using DAX?&lt;/P&gt;</description>
    <pubDate>Tue, 02 Aug 2022 19:16:13 GMT</pubDate>
    <dc:creator>mariana_carmof</dc:creator>
    <dc:date>2022-08-02T19:16:13Z</dc:date>
    <item>
      <title>Sum value in previous day that goal is not blank</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-value-in-previous-day-that-goal-is-not-blank/m-p/2676446#M79998</link>
      <description>&lt;P&gt;Hi guys!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I want to sum the quantity sold on a day that my target is blank to the quantity sold on a day immediately before that target has a value.&amp;nbsp;&lt;BR /&gt;The expected result is:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me to do this using DAX?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 19:16:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-value-in-previous-day-that-goal-is-not-blank/m-p/2676446#M79998</guid>
      <dc:creator>mariana_carmof</dc:creator>
      <dc:date>2022-08-02T19:16:13Z</dc:date>
    </item>
    <item>
      <title>Re: Sum value in previous day that goal is not blank</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-value-in-previous-day-that-goal-is-not-blank/m-p/2678925#M80140</link>
      <description>&lt;P&gt;If you have a Date table linked to both sales and targets then I think the below should work&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sales amended =
IF (
    NOT ISBLANK ( SUM ( Targets[Goal] ) ),
    VAR currentDate =
        SELECTEDVALUE ( 'Date'[Date] )
    VAR nextNonBlank =
        CALCULATE (
            FIRSTNONBLANK ( 'Date'[Date], SUM ( Targets[Goal] ) ),
            'Date'[Date] &amp;gt; currentDate
        )
    RETURN
        CALCULATE (
            SUM ( Sales[Sales made] ),
            DATESBETWEEN ( 'Date'[Date], currentDate, nextNonBlank - 1 )
        )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 03 Aug 2022 14:26:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-value-in-previous-day-that-goal-is-not-blank/m-p/2678925#M80140</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-08-03T14:26:20Z</dc:date>
    </item>
  </channel>
</rss>

