<?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: Difference in amount since last report date made automatic in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-in-amount-since-last-report-date-made-automatic/m-p/3568843#M137598</link>
    <description>&lt;P&gt;Assuming you have a date dimension connected (that is set as a date table), you can use DAX time intelligence to compare this. U can slice the current month and use this as a DAX statement:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;difference since last month =
SUM ( Yourtable[Storage amount] )
    - CALCULATE (
        SUM ( Yourtable[Storage amount] ),
        PREVIOUSMONTH ( YourDateTable[Date] )
    )&lt;/LI-CODE&gt;&lt;P&gt;This will substract the previous month amount from the month you filtered, or used as a column/row.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Dec 2023 16:06:46 GMT</pubDate>
    <dc:creator>ray_codex</dc:creator>
    <dc:date>2023-12-05T16:06:46Z</dc:date>
    <item>
      <title>Difference in amount since last report date made automatic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-in-amount-since-last-report-date-made-automatic/m-p/3568420#M137573</link>
      <description>&lt;P&gt;Hey there&lt;BR /&gt;&lt;BR /&gt;I have run into a problem with the automated report that I am setting up and I am hoping that someone will be able to point me in the right direction. It is the last thing I am missing, and I would really enjoy if it was possible to include it.&lt;BR /&gt;&lt;BR /&gt;Below I have an example of my data that is put into the table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="2"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Region&lt;/TD&gt;&lt;TD&gt;Date of report&lt;/TD&gt;&lt;TD&gt;Category&lt;/TD&gt;&lt;TD&gt;Storage amount&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;North&lt;/TD&gt;&lt;TD&gt;December 1st&lt;/TD&gt;&lt;TD&gt;Pencils&lt;/TD&gt;&lt;TD&gt;4.500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;South&lt;/TD&gt;&lt;TD&gt;December 1st&lt;/TD&gt;&lt;TD&gt;Pencils&lt;/TD&gt;&lt;TD&gt;6.000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;West&lt;/TD&gt;&lt;TD&gt;December 1st&lt;/TD&gt;&lt;TD&gt;Pencils&lt;/TD&gt;&lt;TD&gt;7.500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Central&lt;/TD&gt;&lt;TD&gt;December 1st&lt;/TD&gt;&lt;TD&gt;Pencils&lt;/TD&gt;&lt;TD&gt;10.500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;North&lt;/TD&gt;&lt;TD&gt;November 1st&lt;/TD&gt;&lt;TD&gt;Pencils&lt;/TD&gt;&lt;TD&gt;5.000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;South&lt;/TD&gt;&lt;TD&gt;November 1st&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Pencils&lt;/TD&gt;&lt;TD&gt;5.000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;West&lt;/TD&gt;&lt;TD&gt;November 1st&lt;/TD&gt;&lt;TD&gt;Pencils&lt;/TD&gt;&lt;TD&gt;8.000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Central&lt;/TD&gt;&lt;TD&gt;November 1st&lt;/TD&gt;&lt;TD&gt;Pencils&lt;/TD&gt;&lt;TD&gt;12.000&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would love to be able to set up a formula so that I can see the difference from last month. However, the thing that I would enjoy even more is for this to happen automatically when I refresh my data. On January 1st I am going to be getting new data put into the same table, so I would want it to be compared to the December data instead and see the difference between the values.&lt;BR /&gt;&lt;BR /&gt;So basically what I would want the finished matrix to look like this, and then be able to update it without having to do that manually. So that means next time the change would be calcuated from December 1st and then compared with the new values of January 1st.&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Region&lt;/TD&gt;&lt;TD&gt;Storage amount&lt;/TD&gt;&lt;TD&gt;Change since last&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;North&lt;/TD&gt;&lt;TD&gt;4.500&lt;/TD&gt;&lt;TD&gt;-500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;South&lt;/TD&gt;&lt;TD&gt;6.000&lt;/TD&gt;&lt;TD&gt;1.000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;West&lt;/TD&gt;&lt;TD&gt;7.500&lt;/TD&gt;&lt;TD&gt;-500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Central&lt;/TD&gt;&lt;TD&gt;10.500&lt;/TD&gt;&lt;TD&gt;-1.500&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;I hope someone will be able to help me out, and if there is anything else you need in order to be able to solve my problem, then do let me know!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance and kind regards&lt;/P&gt;&lt;P&gt;- J&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2023 12:50:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-in-amount-since-last-report-date-made-automatic/m-p/3568420#M137573</guid>
      <dc:creator>jksl_12</dc:creator>
      <dc:date>2023-12-05T12:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: Difference in amount since last report date made automatic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-in-amount-since-last-report-date-made-automatic/m-p/3568744#M137588</link>
      <description>&lt;P&gt;Assuming that it's refreshed monthly and you have no calendar table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Change since last refresh =&amp;nbsp;&lt;/P&gt;&lt;P&gt;VAR PreviousMonthValue =&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'YourTableName'[Storage Amount&lt;/SPAN&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;'YourTableName'[Date of Report]&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;= &lt;/SPAN&gt;&lt;SPAN&gt;EDATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;YourTableName'&lt;/SPAN&gt;&lt;SPAN&gt;[Date of Report]&lt;/SPAN&gt;&lt;SPAN&gt;), -&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;VAR CurrentMonthValue =&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'YourTableName'[Storage Amount&lt;/SPAN&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;'YourTableName'[Date of Report]&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;= &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;YourTableName'&lt;/SPAN&gt;&lt;SPAN&gt;[Date of Report]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;CurrentMonthValue - PreviousMonthValue&lt;BR /&gt;&lt;BR /&gt;If it's refreshed randomly, you might need to create a 'Last Refreshed' date column in Power Query, and then use the datesbetween function in place of EDATE/Max&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 05 Dec 2023 15:16:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-in-amount-since-last-report-date-made-automatic/m-p/3568744#M137588</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-12-05T15:16:17Z</dc:date>
    </item>
    <item>
      <title>Re: Difference in amount since last report date made automatic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-in-amount-since-last-report-date-made-automatic/m-p/3568843#M137598</link>
      <description>&lt;P&gt;Assuming you have a date dimension connected (that is set as a date table), you can use DAX time intelligence to compare this. U can slice the current month and use this as a DAX statement:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;difference since last month =
SUM ( Yourtable[Storage amount] )
    - CALCULATE (
        SUM ( Yourtable[Storage amount] ),
        PREVIOUSMONTH ( YourDateTable[Date] )
    )&lt;/LI-CODE&gt;&lt;P&gt;This will substract the previous month amount from the month you filtered, or used as a column/row.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2023 16:06:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Difference-in-amount-since-last-report-date-made-automatic/m-p/3568843#M137598</guid>
      <dc:creator>ray_codex</dc:creator>
      <dc:date>2023-12-05T16:06:46Z</dc:date>
    </item>
  </channel>
</rss>

