<?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 Exclude certain rows in total with negative values in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Exclude-certain-rows-in-total-with-negative-values/m-p/3776936#M147614</link>
    <description>&lt;P&gt;Hi there!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to exclude certain rows in total with negative values. but it seems that the total is still including the negative values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could anyone help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Calculation as below:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Order&lt;/SPAN&gt; &lt;SPAN&gt;not&lt;/SPAN&gt;&lt;SPAN&gt; Sales MTD =&lt;/SPAN&gt; &lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[MTD Order]&lt;/SPAN&gt;&lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;[MTD Sales]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;[MTD Order]&lt;/SPAN&gt;&lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;[MTD Sales]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;BLANK&lt;/SPAN&gt;&lt;SPAN&gt;()),&lt;/SPAN&gt;&lt;SPAN&gt;Pillar&lt;/SPAN&gt;&lt;SPAN&gt;[BU2]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;"Ortho"&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;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Mar 2024 03:26:42 GMT</pubDate>
    <dc:creator>shayla</dc:creator>
    <dc:date>2024-03-20T03:26:42Z</dc:date>
    <item>
      <title>Exclude certain rows in total with negative values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Exclude-certain-rows-in-total-with-negative-values/m-p/3776936#M147614</link>
      <description>&lt;P&gt;Hi there!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to exclude certain rows in total with negative values. but it seems that the total is still including the negative values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could anyone help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Calculation as below:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Order&lt;/SPAN&gt; &lt;SPAN&gt;not&lt;/SPAN&gt;&lt;SPAN&gt; Sales MTD =&lt;/SPAN&gt; &lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[MTD Order]&lt;/SPAN&gt;&lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;[MTD Sales]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;[MTD Order]&lt;/SPAN&gt;&lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;[MTD Sales]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;BLANK&lt;/SPAN&gt;&lt;SPAN&gt;()),&lt;/SPAN&gt;&lt;SPAN&gt;Pillar&lt;/SPAN&gt;&lt;SPAN&gt;[BU2]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;"Ortho"&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;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 03:26:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Exclude-certain-rows-in-total-with-negative-values/m-p/3776936#M147614</guid>
      <dc:creator>shayla</dc:creator>
      <dc:date>2024-03-20T03:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude certain rows in total with negative values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Exclude-certain-rows-in-total-with-negative-values/m-p/3776970#M147618</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am not sure how your semantic model looks like, but please try something like below whether it suits your requirement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Order not Sales MTD =
VAR _t =
    ADDCOLUMNS (
        SUMMARIZE ( fact_table, business_unit[Business Unit], product[Product Cat] ),
        "@metrics",
            CALCULATE (
                IF ( [MTD Order] - [MTD Sales] &amp;gt; 0, [MTD Order] - [MTD Sales], BLANK () ),
                Pillar[BU2] &amp;lt;&amp;gt; "Ortho"
            )
    )
RETURN
    SUMX ( _t, [@metrics] )
&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 20 Mar 2024 03:53:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Exclude-certain-rows-in-total-with-negative-values/m-p/3776970#M147618</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2024-03-20T03:53:16Z</dc:date>
    </item>
  </channel>
</rss>

