<?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: Subtracting from the same column based on selected filter in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtracting-from-the-same-column-based-on-selected-filter/m-p/2661727#M78956</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Worked like a charm! Thanks for such detailed sulution!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 26 Jul 2022 10:54:57 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-07-26T10:54:57Z</dc:date>
    <item>
      <title>Subtracting from the same column based on selected filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtracting-from-the-same-column-based-on-selected-filter/m-p/2652964#M78280</link>
      <description>&lt;P&gt;Hi Power Bi Community,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I need your support on writting DAX commend.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I've a table that consist of project ID and Turnover over the years.&amp;nbsp;&amp;nbsp;&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;Project ID&lt;/TD&gt;&lt;TD&gt;Turnover MEUR&lt;/TD&gt;&lt;TD&gt;Year&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ID99&lt;/TD&gt;&lt;TD&gt;0,1&lt;/TD&gt;&lt;TD&gt;2021&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ID98&lt;/TD&gt;&lt;TD&gt;0,5&lt;/TD&gt;&lt;TD&gt;2021&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ID99&lt;/TD&gt;&lt;TD&gt;0,3&lt;/TD&gt;&lt;TD&gt;2022&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ID98&lt;/TD&gt;&lt;TD&gt;0,7&lt;/TD&gt;&lt;TD&gt;2022&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ID99&lt;/TD&gt;&lt;TD&gt;0,5&lt;/TD&gt;&lt;TD&gt;2023&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ID98&lt;/TD&gt;&lt;TD&gt;0,9&lt;/TD&gt;&lt;TD&gt;2023&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to subtract turnover over years, in order to be able calculate the growh. In other words,&amp;nbsp;&amp;nbsp;&lt;BR /&gt;Growth = Turnover 2022 (ID99) - Turnover 2021 (ID99), Turnover 2023 (ID99) - Turnover 2022 (ID99), Turnover 2022 (ID98) - Turnover 2021 (ID98) ...etc.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Any ideas, how I can write this in DAX command ?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2022 11:22:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtracting-from-the-same-column-based-on-selected-filter/m-p/2652964#M78280</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-21T11:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: Subtracting from the same column based on selected filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtracting-from-the-same-column-based-on-selected-filter/m-p/2653020#M78285</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please refer to the sample with the solution&amp;nbsp;&lt;A href="https://www.dropbox.com/t/80L2KufXOL8k8xLc" target="_blank"&gt;https://www.dropbox.com/t/80L2KufXOL8k8xLc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Turnover YOY = 
VAR CurrentYer = SELECTEDVALUE ( Turnover[Year] )
VAR FirstSelectedYear = CALCULATE ( MIN ( Turnover[Year] ), ALLSELECTED ( Turnover ) )
VAR CurrentValue = SUM ( Turnover[Turnover MEUR] )
VAR PreviousValue = CALCULATE ( SUM ( Turnover[Turnover MEUR] ), Turnover[Year] = CurrentYer - 1 )
RETURN
     IF (
         CurrentYer &amp;lt;&amp;gt; FirstSelectedYear,
        CurrentValue - PreviousValue
     )&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 21 Jul 2022 11:46:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtracting-from-the-same-column-based-on-selected-filter/m-p/2653020#M78285</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-07-21T11:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: Subtracting from the same column based on selected filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtracting-from-the-same-column-based-on-selected-filter/m-p/2661727#M78956</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Worked like a charm! Thanks for such detailed sulution!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2022 10:54:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Subtracting-from-the-same-column-based-on-selected-filter/m-p/2661727#M78956</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-26T10:54:57Z</dc:date>
    </item>
  </channel>
</rss>

