<?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 Calculate Absolute Change Y-o-Y in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Absolute-Change-Y-o-Y/m-p/2252174#M54259</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am sure this is simple - I cannot seem to figure it out.&lt;/P&gt;&lt;P&gt;I have created a calculation to divide Dollars by Units to give me an Average Selling Price.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I create a formula to calculate the absolute change between my calculation for Y-o-Y.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For Ex: 2021 Average Selling Price = $335 and 2020 = $407 the result should show an absolute change Y-o-Y of -$72.&lt;/P&gt;&lt;P&gt;How can I build a DAX query to calculate this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks very much,&lt;/P&gt;&lt;P&gt;Dave&lt;/P&gt;</description>
    <pubDate>Wed, 22 Dec 2021 14:36:05 GMT</pubDate>
    <dc:creator>Dlahey</dc:creator>
    <dc:date>2021-12-22T14:36:05Z</dc:date>
    <item>
      <title>Calculate Absolute Change Y-o-Y</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Absolute-Change-Y-o-Y/m-p/2252174#M54259</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am sure this is simple - I cannot seem to figure it out.&lt;/P&gt;&lt;P&gt;I have created a calculation to divide Dollars by Units to give me an Average Selling Price.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I create a formula to calculate the absolute change between my calculation for Y-o-Y.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For Ex: 2021 Average Selling Price = $335 and 2020 = $407 the result should show an absolute change Y-o-Y of -$72.&lt;/P&gt;&lt;P&gt;How can I build a DAX query to calculate this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks very much,&lt;/P&gt;&lt;P&gt;Dave&lt;/P&gt;</description>
      <pubDate>Wed, 22 Dec 2021 14:36:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Absolute-Change-Y-o-Y/m-p/2252174#M54259</guid>
      <dc:creator>Dlahey</dc:creator>
      <dc:date>2021-12-22T14:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Absolute Change Y-o-Y</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Absolute-Change-Y-o-Y/m-p/2252386#M54275</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="334260" data-lia-user-login="Dlahey" class="lia-mention lia-mention-user"&gt;Dlahey&lt;/a&gt; , Assume you have Average Selling Price &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;YTD Sales = CALCULATE([Average Selling Price],DATESYTD('Date'[Date],"12/31"))&lt;BR /&gt;Last YTD Sales = CALCULATE([Average Selling Price],DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Power BI — Year on Year with or Without Time Intelligence &lt;BR /&gt;&lt;A href="https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a" target="_blank"&gt;https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=km41KfM_0uA" target="_blank"&gt;https://www.youtube.com/watch?v=km41KfM_0uA&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Dec 2021 16:22:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Absolute-Change-Y-o-Y/m-p/2252386#M54275</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-12-22T16:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Absolute Change Y-o-Y</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Absolute-Change-Y-o-Y/m-p/2252509#M54287</link>
      <description>&lt;P&gt;thank you - I have tried this and it doesn't seem to give me the desired output&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ASP Consolidated LYTD = &lt;/SPAN&gt;&lt;SPAN&gt;calculate&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Calculated Table'&lt;/SPAN&gt;&lt;SPAN&gt;[Average Selling Price - Consolidated]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;DATESYTD&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;dateadd&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Working_Days[Reference Date]&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;,-&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Year&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;"12/31"&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ASP Consolidated YTD = &lt;/SPAN&gt;&lt;SPAN&gt;calculate&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Calculated Table'&lt;/SPAN&gt;&lt;SPAN&gt;[Average Selling Price - Consolidated]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;datesytd&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Working_Days[Reference Date]&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"12/31"&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;the output shows as -$335 instead of -$72&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 22 Dec 2021 17:41:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Absolute-Change-Y-o-Y/m-p/2252509#M54287</guid>
      <dc:creator>Dlahey</dc:creator>
      <dc:date>2021-12-22T17:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Absolute Change Y-o-Y</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Absolute-Change-Y-o-Y/m-p/2256631#M54474</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="334260" data-lia-user-login="Dlahey" class="lia-mention lia-mention-user"&gt;Dlahey&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Has the following measure without using the time intelligence functions been tried? Does it return the correct value? If it is still wrong, please provide your sample data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
var _YTD = 
    CALCULATE(
        [Average Selling Price - Consolidated],
        FILTER(
            ALLSELECTED( Working_Days ), 
            year( Working_Days[Reference Date] ) = YEAR( TODAY() )
        )
    )
var LYTD = 
    CALCULATE(
        [Average Selling Price - Consolidated],
        FILTER(
            ALLSELECTED( Working_Days ), 
            year( Working_Days[Reference Date] ) = YEAR( TODAY() ) - 1
        )
    )    
return _YTD - LYTD&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Winniz&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution 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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Dec 2021 08:51:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Absolute-Change-Y-o-Y/m-p/2256631#M54474</guid>
      <dc:creator>v-kkf-msft</dc:creator>
      <dc:date>2021-12-27T08:51:50Z</dc:date>
    </item>
  </channel>
</rss>

