<?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: Diffrance between 2 values at different years. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Diffrance-between-2-values-at-different-years/m-p/2980396#M99894</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="469142" data-lia-user-login="HishamAT" class="lia-mention lia-mention-user"&gt;HishamAT&lt;/a&gt;&amp;nbsp;，&lt;/P&gt;
&lt;P&gt;I can only think of a simpler way.&amp;nbsp;The first is to directly modify the numbers in the formula.&amp;nbsp;Another way is to use slicers.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = -SELECTEDVALUE('Table'[Column1])&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Measure 2 = EDATE ( MAX ( 'Table 2'[Date] ), [Measure] )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/edate-function-dax" target="_blank"&gt;EDATE function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Community Support Team _ Polly&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 21 Dec 2022 01:21:12 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-12-21T01:21:12Z</dc:date>
    <item>
      <title>Diffrance between 2 values at different years.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Diffrance-between-2-values-at-different-years/m-p/2975070#M99585</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Let's say that I have a field called NHC = 7.6 at year 2022 on the month of December&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Same field at year 2019 was 10.4 at the month of December&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;I need to calculate the difference between the same fields for the same month in the years 2022 and 2019&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sun, 18 Dec 2022 06:10:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Diffrance-between-2-values-at-different-years/m-p/2975070#M99585</guid>
      <dc:creator>HishamAT</dc:creator>
      <dc:date>2022-12-18T06:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: Diffrance between 2 values at different years.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Diffrance-between-2-values-at-different-years/m-p/2975072#M99587</link>
      <description>&lt;P&gt;hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="469142" data-lia-user-login="HishamAT" class="lia-mention lia-mention-user"&gt;HishamAT&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;seems not very doable. could you also provide some sample data and how you would like to present the result?&lt;/P&gt;</description>
      <pubDate>Sun, 18 Dec 2022 06:21:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Diffrance-between-2-values-at-different-years/m-p/2975072#M99587</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2022-12-18T06:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: Diffrance between 2 values at different years.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Diffrance-between-2-values-at-different-years/m-p/2975125#M99590</link>
      <description>&lt;P&gt;- NHC = 7.6&amp;nbsp;&amp;nbsp;at year 2022 on the month of December&amp;nbsp;&lt;/P&gt;&lt;P&gt;-&amp;nbsp;NHC = 10.4 at year 2019 on the month of December&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I need to calculate the difference between the same fields for the same month in the years 2022 and 2019&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Dec 2022 09:48:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Diffrance-between-2-values-at-different-years/m-p/2975125#M99590</guid>
      <dc:creator>HishamAT</dc:creator>
      <dc:date>2022-12-18T09:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: Diffrance between 2 values at different years.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Diffrance-between-2-values-at-different-years/m-p/2977766#M99743</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="469142" data-lia-user-login="HishamAT" class="lia-mention lia-mention-user"&gt;HishamAT&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please have a try.&lt;/P&gt;
&lt;P&gt;Create a measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;measure =
VAR _year =
    EDATE ( MAX ( 'Table 2'[Date] ), -36 )
VAR _value =
    CALCULATE (
        MAX ( 'TABLE'[NHC COLUMN NAME] ),
        FILTER ( ALL ( TABLE ), 'TABLE'[DATE] = SELECTEDVALUE ( 'TABLE'[DATE] ) )
    )
RETURN
    MAX ( 'TABLE'[NHC COLUMN NAME] ) - _value
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Community Support Team _ Polly&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 02:19:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Diffrance-between-2-values-at-different-years/m-p/2977766#M99743</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-20T02:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: Diffrance between 2 values at different years.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Diffrance-between-2-values-at-different-years/m-p/2978930#M99814</link>
      <description>&lt;P&gt;Great Sir, is that any way to make the 36 a dynamic date such 1 ,2, 3 .... etc ( As requested by the user ) .&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 12:07:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Diffrance-between-2-values-at-different-years/m-p/2978930#M99814</guid>
      <dc:creator>HishamAT</dc:creator>
      <dc:date>2022-12-20T12:07:58Z</dc:date>
    </item>
    <item>
      <title>Re: Diffrance between 2 values at different years.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Diffrance-between-2-values-at-different-years/m-p/2980396#M99894</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="469142" data-lia-user-login="HishamAT" class="lia-mention lia-mention-user"&gt;HishamAT&lt;/a&gt;&amp;nbsp;，&lt;/P&gt;
&lt;P&gt;I can only think of a simpler way.&amp;nbsp;The first is to directly modify the numbers in the formula.&amp;nbsp;Another way is to use slicers.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = -SELECTEDVALUE('Table'[Column1])&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Measure 2 = EDATE ( MAX ( 'Table 2'[Date] ), [Measure] )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/edate-function-dax" target="_blank"&gt;EDATE function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Community Support Team _ Polly&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 01:21:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Diffrance-between-2-values-at-different-years/m-p/2980396#M99894</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-21T01:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Diffrance between 2 values at different years.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Diffrance-between-2-values-at-different-years/m-p/2980940#M99925</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Thanks for your support , It works fine.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 07:44:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Diffrance-between-2-values-at-different-years/m-p/2980940#M99925</guid>
      <dc:creator>HishamAT</dc:creator>
      <dc:date>2022-12-21T07:44:39Z</dc:date>
    </item>
  </channel>
</rss>

