<?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: DAX Row minus Previous Row in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Row-minus-Previous-Row/m-p/2505374#M69366</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="190551" data-lia-user-login="archerjayden" class="lia-mention lia-mention-user"&gt;archerjayden&lt;/a&gt; , You have to day on day time intelligence using date table (or prefer date table)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use previousday function&lt;/P&gt;
&lt;P&gt;sum(Table[Total Qty]) - calculate(Table[Total Qty]) ,previousday ('Date'[Date] ) )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Day Intelligence - Last day, last non continous day &lt;BR /&gt;&lt;A href="https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c3243d1f9" target="_blank"&gt;https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c3243d1f9&lt;/A&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 10 May 2022 15:42:59 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2022-05-10T15:42:59Z</dc:date>
    <item>
      <title>DAX Row minus Previous Row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Row-minus-Previous-Row/m-p/1263723#M21120</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am looking for help on achieving moving range from data.&lt;/P&gt;&lt;P&gt;How do I get DAX to subtract row by previous row?&lt;/P&gt;&lt;P&gt;I am working on SQL Server direct query mode and unable to crack this for my report.&lt;/P&gt;&lt;P&gt;Please advise and kindly refer to excel sample data and formula below I’ve tried.&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;[TotalQty] =
                 Divide(SUM([delivered_quantity]),SUM([req_quantity]),0)

PreviousRowSubtract = 
                  ([TotalQty]) - CALCULATE ( 
        
      SUMX([delivered_quantity])/SUMX([req_quantity])*100,FILTER([Date]=dateadd([Date],-1,Day)))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Column D is what I am trying to achieve this would have other filter contexts like Year, MonthNum, WeekNum and Weekday in the form of Slicers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Archer&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jul 2020 04:21:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Row-minus-Previous-Row/m-p/1263723#M21120</guid>
      <dc:creator>archerjayden</dc:creator>
      <dc:date>2020-07-31T04:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Row minus Previous Row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Row-minus-Previous-Row/m-p/1263781#M21123</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="190551" data-lia-user-login="archerjayden" class="lia-mention lia-mention-user"&gt;archerjayden&lt;/a&gt; , try as new column&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;new colum = &lt;BR /&gt;var _date = maxx( filter(Table,[date] &amp;lt;earlier([date])),[Date])&lt;BR /&gt;return &lt;BR /&gt;[total qty] - maxx( filter(Table,[date] = _date)),[total qty])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;//prefer this if you have continuous date&lt;/P&gt;
&lt;P&gt;new colum = &lt;BR /&gt;[total qty] - maxx( filter(Table,[date] = earlier([date])-1),[total qty])&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jul 2020 04:58:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Row-minus-Previous-Row/m-p/1263781#M21123</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-07-31T04:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Row minus Previous Row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Row-minus-Previous-Row/m-p/1264315#M21136</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp; thanks for your approach! I am using Direct query and function Earlier doesnt work no matter how I tried? would you happen to know an alternative approach for the same please?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS : I can't even add an Index column from PQ&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jul 2020 08:38:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Row-minus-Previous-Row/m-p/1264315#M21136</guid>
      <dc:creator>archerjayden</dc:creator>
      <dc:date>2020-07-31T08:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Row minus Previous Row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Row-minus-Previous-Row/m-p/1264427#M21141</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="190551" data-lia-user-login="archerjayden" class="lia-mention lia-mention-user"&gt;archerjayden&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;This could work:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Column = 
VAR _DATE = 'Table'[A]
VAR _LASTDATE = 
    CALCULATE(
        MAX('Table'[A]),
        FILTER('Table','Table'[A] &amp;lt; _DATE)
    )
RETURN
[B]
-
CALCULATE(
    MAX([C]),FILTER('Table','Table'[A] = _LASTDATE))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;________________________&lt;/P&gt;&lt;P&gt;Did I answer your question? Mark this post as a solution, this will help others!.&lt;/P&gt;&lt;P&gt;Click on the Thumbs-Up icon on the right if you like this reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;&lt;A href="https://www.youtube.com/channel/UCKwBEguA8IlBubIobaOormg?sub_confirmation=1" target="_blank"&gt;YouTube, &lt;/A&gt;&lt;A href="https://linkedin.com/in/fowmy" target="_blank"&gt;LinkedIn&lt;/A&gt;&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jul 2020 09:27:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Row-minus-Previous-Row/m-p/1264427#M21141</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2020-07-31T09:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Row minus Previous Row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Row-minus-Previous-Row/m-p/2505374#M69366</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="190551" data-lia-user-login="archerjayden" class="lia-mention lia-mention-user"&gt;archerjayden&lt;/a&gt; , You have to day on day time intelligence using date table (or prefer date table)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use previousday function&lt;/P&gt;
&lt;P&gt;sum(Table[Total Qty]) - calculate(Table[Total Qty]) ,previousday ('Date'[Date] ) )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Day Intelligence - Last day, last non continous day &lt;BR /&gt;&lt;A href="https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c3243d1f9" target="_blank"&gt;https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c3243d1f9&lt;/A&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 15:42:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Row-minus-Previous-Row/m-p/2505374#M69366</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-05-10T15:42:59Z</dc:date>
    </item>
  </channel>
</rss>

