<?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: if value is negative set 0 screws up the total value in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-value-is-negative-set-0-screws-up-the-total-value/m-p/2824566#M89769</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="351870" data-lia-user-login="groetschel" class="lia-mention lia-mention-user"&gt;groetschel&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here I suggest you to create a new measure based on [Days to book] instead of using sumx function in [Days to book] measure directly.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure with correct total =
SUMX ( 'tablename', [Days to book] )&lt;/LI-CODE&gt;
&lt;P&gt;I think the columns used in measure [To Deliver] or [Planned days] should come from same table. 'tablename' is that table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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;</description>
    <pubDate>Fri, 07 Oct 2022 05:34:51 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-10-07T05:34:51Z</dc:date>
    <item>
      <title>if value is negative set 0 screws up the total value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-value-is-negative-set-0-screws-up-the-total-value/m-p/2823624#M89702</link>
      <description>&lt;P&gt;Hi community&lt;/P&gt;&lt;P&gt;I found a strange error in how a total is calculated.&lt;/P&gt;&lt;P&gt;Days to book (3rd column) is a measure: if([To Deliver]-[Planned Days]&amp;lt;0,0,[To Deliver]-[Planned Days])&lt;/P&gt;&lt;P&gt;The values in the table body are all calculated correctly, BUT the total should sum the single values from the table body and not calculate the total of column 1 minus the total of column 2.&lt;/P&gt;&lt;P&gt;How do I do that?&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Gunnar&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 17:57:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-value-is-negative-set-0-screws-up-the-total-value/m-p/2823624#M89702</guid>
      <dc:creator>groetschel</dc:creator>
      <dc:date>2022-10-06T17:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: if value is negative set 0 screws up the total value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-value-is-negative-set-0-screws-up-the-total-value/m-p/2824454#M89755</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="351870" data-lia-user-login="groetschel" class="lia-mention lia-mention-user"&gt;groetschel&lt;/a&gt; , Force to add up from row&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sumx(Values( Table[Column]) , if([To Deliver]-[Planned Days]&amp;lt;0,0,[To Deliver]-[Planned Days]) )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;here column is not summarized column in visual.If there are more than one use summarize&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 03:44:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-value-is-negative-set-0-screws-up-the-total-value/m-p/2824454#M89755</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-10-07T03:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: if value is negative set 0 screws up the total value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-value-is-negative-set-0-screws-up-the-total-value/m-p/2824566#M89769</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="351870" data-lia-user-login="groetschel" class="lia-mention lia-mention-user"&gt;groetschel&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here I suggest you to create a new measure based on [Days to book] instead of using sumx function in [Days to book] measure directly.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure with correct total =
SUMX ( 'tablename', [Days to book] )&lt;/LI-CODE&gt;
&lt;P&gt;I think the columns used in measure [To Deliver] or [Planned days] should come from same table. 'tablename' is that table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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;</description>
      <pubDate>Fri, 07 Oct 2022 05:34:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-value-is-negative-set-0-screws-up-the-total-value/m-p/2824566#M89769</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-07T05:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: if value is negative set 0 screws up the total value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-value-is-negative-set-0-screws-up-the-total-value/m-p/2826089#M89857</link>
      <description>&lt;P&gt;I added the new measure&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM&gt;Order Book correct total = sumx('Order Book',[Order Book open days to book])&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;But the calculation is completely off.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Do you know what it calculates now?&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 14:43:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-value-is-negative-set-0-screws-up-the-total-value/m-p/2826089#M89857</guid>
      <dc:creator>groetschel</dc:creator>
      <dc:date>2022-10-07T14:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: if value is negative set 0 screws up the total value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-value-is-negative-set-0-screws-up-the-total-value/m-p/2826287#M89864</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just keep in mind that the total of your table is not the sum of above lines, but is the same calculation as the one on the lines without the "filter" from your lines.&lt;/P&gt;
&lt;P&gt;Sinxe we cannot see it on your screen copy, you have a column on the left part of your table witha book ID or some equivalent.&lt;/P&gt;
&lt;P&gt;Thanks to it the detailed lines of your visual are doing the calculation on each lines, whereas the total is calculated with "all" lines from your table. So your test (negative or not) is not relevant on the total which explains the strange value.&lt;/P&gt;
&lt;P&gt;As&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;propose you, by using a SUMX you force PBI to keep the calculation at the line level.&lt;/P&gt;
&lt;P&gt;Hope it makes things more clear&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 15:47:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-value-is-negative-set-0-screws-up-the-total-value/m-p/2826287#M89864</guid>
      <dc:creator>AilleryO</dc:creator>
      <dc:date>2022-10-07T15:47:13Z</dc:date>
    </item>
  </channel>
</rss>

