<?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: Calculating Value Changes over Years and months with measures in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Value-Changes-over-Years-and-months-with-measures/m-p/2891807#M93894</link>
    <description>&lt;P&gt;Thanks, I was able to get this also using a measure not a column but how now would you calculate apples sold in the year to date? As due to the first 2 days not being in the date table and it not the end of the year. So startofyear and endofear date functions don't seem to work&lt;/P&gt;</description>
    <pubDate>Tue, 08 Nov 2022 10:02:05 GMT</pubDate>
    <dc:creator>Hodgy007</dc:creator>
    <dc:date>2022-11-08T10:02:05Z</dc:date>
    <item>
      <title>Calculating Value Changes over Years and months with measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Value-Changes-over-Years-and-months-with-measures/m-p/2880756#M93240</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Ok on this face of it this looks easy buy finding it hard to do using measures, this is v simple in excel, but imagine this is 2 years of data.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Im looking to create a measure for Apples sold this year&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and table of apples sold per month (Apples Month Diff)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN&gt;Date&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;Apples in Stock&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN&gt;2022-01-03&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN&gt;2022-02-01&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;75&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN&gt;2022-03-01&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;60&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN&gt;2022-04-01&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN&gt;2022-05-02&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;41&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN&gt;2022-06-01&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;8&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2022 16:03:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Value-Changes-over-Years-and-months-with-measures/m-p/2880756#M93240</guid>
      <dc:creator>Hodgy007</dc:creator>
      <dc:date>2022-11-02T16:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Value Changes over Years and months with measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Value-Changes-over-Years-and-months-with-measures/m-p/2882438#M93338</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="465834" data-lia-user-login="Hodgy007" class="lia-mention lia-mention-user"&gt;Hodgy007&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is my test table:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please create new columns as below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Month = MONTH('Table'[Date])

Current month value = CALCULATE(SUM('Table'[Apples in stock]),FILTER('Table','Table'[Month] = EARLIER('Table'[Month])))

Last month value = CALCULATE(SUM('Table'[Apples in stock]),FILTER('Table','Table'[Month] = EARLIER('Table'[Month])-1))

Month Diff = IF('Table'[Last month value] &amp;lt;&amp;gt; BLANK(), [Current month value]-[Last month value])&lt;/LI-CODE&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;Create a table visual, is this the result you want?&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Yadong Fang&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 09:32:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Value-Changes-over-Years-and-months-with-measures/m-p/2882438#M93338</guid>
      <dc:creator>v-yadongf-msft</dc:creator>
      <dc:date>2022-11-03T09:32:35Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Value Changes over Years and months with measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Value-Changes-over-Years-and-months-with-measures/m-p/2891807#M93894</link>
      <description>&lt;P&gt;Thanks, I was able to get this also using a measure not a column but how now would you calculate apples sold in the year to date? As due to the first 2 days not being in the date table and it not the end of the year. So startofyear and endofear date functions don't seem to work&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 10:02:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Value-Changes-over-Years-and-months-with-measures/m-p/2891807#M93894</guid>
      <dc:creator>Hodgy007</dc:creator>
      <dc:date>2022-11-08T10:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Value Changes over Years and months with measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Value-Changes-over-Years-and-months-with-measures/m-p/2894981#M94067</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="465834" data-lia-user-login="Hodgy007" class="lia-mention lia-mention-user"&gt;Hodgy007&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm a little confused about what's the meaning of&amp;nbsp; "&lt;SPAN&gt;the first 2 days not being in the date table and it not the end of the year", can you explain it in details ?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If convenient, could you please share with me some screenshots of your data after hiding sensitive information ?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks for your efforts &amp;amp; time in advance.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Yadong Fang&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2022 09:46:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Value-Changes-over-Years-and-months-with-measures/m-p/2894981#M94067</guid>
      <dc:creator>v-yadongf-msft</dc:creator>
      <dc:date>2022-11-09T09:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Value Changes over Years and months with measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Value-Changes-over-Years-and-months-with-measures/m-p/2894997#M94069</link>
      <description>&lt;P&gt;The diff value of apples sold is in month 2 not month 1 so the charting is out by a month if you try and graph it so it looks like 227 were sold in feb not jan&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2022 09:51:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Value-Changes-over-Years-and-months-with-measures/m-p/2894997#M94069</guid>
      <dc:creator>Hodgy007</dc:creator>
      <dc:date>2022-11-09T09:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Value Changes over Years and months with measures</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Value-Changes-over-Years-and-months-with-measures/m-p/2899812#M94399</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="465834" data-lia-user-login="Hodgy007" class="lia-mention lia-mention-user"&gt;Hodgy007&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Well, please create two columns:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Next month value = CALCULATE(SUM('Table'[Apples in stock]),FILTER('Table','Table'[Month] = EARLIER('Table'[Month])+1))

Month Diff = IF('Table'[Next month value] &amp;lt;&amp;gt; BLANK(), [Next month value] - [Current month value])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The diff value will show from Month 1.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Yadong Fang&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 09:44:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Value-Changes-over-Years-and-months-with-measures/m-p/2899812#M94399</guid>
      <dc:creator>v-yadongf-msft</dc:creator>
      <dc:date>2022-11-11T09:44:15Z</dc:date>
    </item>
  </channel>
</rss>

