<?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: Writing a measure to subtract two columns same table with filters in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Writing-a-measure-to-subtract-two-columns-same-table-with/m-p/3260314#M120532</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="465993" data-lia-user-login="EMSSS22" class="lia-mention lia-mention-user"&gt;EMSSS22&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Apologies for the late reply. Please try&lt;/P&gt;
&lt;P&gt;ForecastCMVariance =&lt;BR /&gt;SUMX (&lt;BR /&gt;FILTER ( Commercial, Commercial[Version] = "x" &amp;amp;&amp;amp; Commercial[month number] = y ),&lt;BR /&gt;Commercial[Forecast] - Commercial[Capital Rental]&lt;BR /&gt;)&lt;/P&gt;</description>
    <pubDate>Tue, 30 May 2023 19:14:50 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2023-05-30T19:14:50Z</dc:date>
    <item>
      <title>Writing a measure to subtract two columns same table with filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Writing-a-measure-to-subtract-two-columns-same-table-with/m-p/3259861#M120505</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 2 columns that i would like to subtract from one another after applied filters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Eg.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Column B (with version type x and month number x) - Column A&amp;nbsp;(with version type x and month number x)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I currently have and is giving me wrong answer:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ForecastCMVariance = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FilteredCommercial&lt;/SPAN&gt;&lt;SPAN&gt;[Forecast]&lt;/SPAN&gt;&lt;SPAN&gt;) - &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FilteredCommercial&lt;/SPAN&gt;&lt;SPAN&gt;[Capital Rental]&lt;/SPAN&gt;&lt;SPAN&gt;)))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I go about writing this dax?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;LI-MESSAGE title="DAX filter" uid="3140948" url="https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-filter/m-p/3140948#U3140948" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2023 14:33:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Writing-a-measure-to-subtract-two-columns-same-table-with/m-p/3259861#M120505</guid>
      <dc:creator>EMSSS22</dc:creator>
      <dc:date>2023-05-30T14:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: Writing a measure to subtract two columns same table with filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Writing-a-measure-to-subtract-two-columns-same-table-with/m-p/3259974#M120514</link>
      <description>&lt;P&gt;Try something like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;ForecastCMVariance =
CALCULATE (
    SUMX (
        FilteredCommercial,
        FilteredCommercial[Forecast] - FilteredCommercial[Capital Rental]
    ),
    FilteredCommercial[Version] = "x",
    FilteredCommercial[month number] = y
)
&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 30 May 2023 15:15:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Writing-a-measure-to-subtract-two-columns-same-table-with/m-p/3259974#M120514</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2023-05-30T15:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: Writing a measure to subtract two columns same table with filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Writing-a-measure-to-subtract-two-columns-same-table-with/m-p/3259978#M120515</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="465993" data-lia-user-login="EMSSS22" class="lia-mention lia-mention-user"&gt;EMSSS22&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are version type and month number from the same table or different tables? What are the relationship between the tables? When you refer to "x" is it the same value used to filter both columns?&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2023 15:16:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Writing-a-measure-to-subtract-two-columns-same-table-with/m-p/3259978#M120515</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-05-30T15:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: Writing a measure to subtract two columns same table with filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Writing-a-measure-to-subtract-two-columns-same-table-with/m-p/3259985#M120516</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes its the same table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes the same filter needs to be applied to both columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2023 15:19:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Writing-a-measure-to-subtract-two-columns-same-table-with/m-p/3259985#M120516</guid>
      <dc:creator>EMSSS22</dc:creator>
      <dc:date>2023-05-30T15:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: Writing a measure to subtract two columns same table with filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Writing-a-measure-to-subtract-two-columns-same-table-with/m-p/3260314#M120532</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="465993" data-lia-user-login="EMSSS22" class="lia-mention lia-mention-user"&gt;EMSSS22&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Apologies for the late reply. Please try&lt;/P&gt;
&lt;P&gt;ForecastCMVariance =&lt;BR /&gt;SUMX (&lt;BR /&gt;FILTER ( Commercial, Commercial[Version] = "x" &amp;amp;&amp;amp; Commercial[month number] = y ),&lt;BR /&gt;Commercial[Forecast] - Commercial[Capital Rental]&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2023 19:14:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Writing-a-measure-to-subtract-two-columns-same-table-with/m-p/3260314#M120532</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-05-30T19:14:50Z</dc:date>
    </item>
  </channel>
</rss>

