<?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: Creating a measure to show 0 if the two divided numbers are both negative. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-measure-to-show-0-if-the-two-divided-numbers-are-both/m-p/2800793#M88109</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="448168" data-lia-user-login="kmschroer" class="lia-mention lia-mention-user"&gt;kmschroer&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How about :&lt;/P&gt;
&lt;PRE&gt;IF ( 
    AND ( 
        SUM ( 'Office Earnings'[Group Task NumberCurrent Profit] ) &amp;lt; 0, 
        SUM ( 'Office Earnings'[Group Task NumberCurrent Net Revenue] ) &amp;lt; 0 
    ),
    0,
    DIVIDE (
        SUM ( 'Office Earnings'[Group Task NumberCurrent Profit] ),
        SUM ( 'Office Earnings'[Group Task NumberCurrent Net Revenue] )
    )
)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know, if this helps &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/Tom&lt;BR /&gt;&lt;A href="https://www.tackytech.blog/" target="_blank"&gt;https://www.tackytech.blog/&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.instagram.com/tackytechtom/" target="_blank"&gt;https://www.instagram.com/tackytechtom/&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Sep 2022 18:54:32 GMT</pubDate>
    <dc:creator>tackytechtom</dc:creator>
    <dc:date>2022-09-27T18:54:32Z</dc:date>
    <item>
      <title>Creating a measure to show 0 if the two divided numbers are both negative.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-measure-to-show-0-if-the-two-divided-numbers-are-both/m-p/2800739#M88107</link>
      <description>&lt;P&gt;Hi everyone - I have the following measure:&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;&lt;SPAN&gt;PROFIT % OF NSR = &lt;/SPAN&gt;&lt;SPAN&gt;divide&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;sum&lt;/SPAN&gt;&lt;SPAN&gt;('Office Earnings'[Group Task NumberCurrent Profit]),&lt;/SPAN&gt;&lt;SPAN&gt;sum&lt;/SPAN&gt;&lt;SPAN&gt;('Office Earnings'[Group Task NumberCurrent Net Revenue]))&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there a way to add a line to this that makes the "Profit % of NSR" zero if the sum of 'Net Revenue' and sum of 'Profit' are both negative numbers?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2022 18:45:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-measure-to-show-0-if-the-two-divided-numbers-are-both/m-p/2800739#M88107</guid>
      <dc:creator>kmschroer</dc:creator>
      <dc:date>2022-09-27T18:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a measure to show 0 if the two divided numbers are both negative.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-measure-to-show-0-if-the-two-divided-numbers-are-both/m-p/2800793#M88109</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="448168" data-lia-user-login="kmschroer" class="lia-mention lia-mention-user"&gt;kmschroer&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How about :&lt;/P&gt;
&lt;PRE&gt;IF ( 
    AND ( 
        SUM ( 'Office Earnings'[Group Task NumberCurrent Profit] ) &amp;lt; 0, 
        SUM ( 'Office Earnings'[Group Task NumberCurrent Net Revenue] ) &amp;lt; 0 
    ),
    0,
    DIVIDE (
        SUM ( 'Office Earnings'[Group Task NumberCurrent Profit] ),
        SUM ( 'Office Earnings'[Group Task NumberCurrent Net Revenue] )
    )
)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know, if this helps &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/Tom&lt;BR /&gt;&lt;A href="https://www.tackytech.blog/" target="_blank"&gt;https://www.tackytech.blog/&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.instagram.com/tackytechtom/" target="_blank"&gt;https://www.instagram.com/tackytechtom/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2022 18:54:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-measure-to-show-0-if-the-two-divided-numbers-are-both/m-p/2800793#M88109</guid>
      <dc:creator>tackytechtom</dc:creator>
      <dc:date>2022-09-27T18:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a measure to show 0 if the two divided numbers are both negative.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-measure-to-show-0-if-the-two-divided-numbers-are-both/m-p/2802808#M88249</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="353745" data-lia-user-login="tackytechtom" class="lia-mention lia-mention-user"&gt;tackytechtom&lt;/a&gt;&amp;nbsp;You are awesome! That worked perfectly thank you so much!&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 12:45:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-measure-to-show-0-if-the-two-divided-numbers-are-both/m-p/2802808#M88249</guid>
      <dc:creator>kmschroer</dc:creator>
      <dc:date>2022-09-28T12:45:44Z</dc:date>
    </item>
  </channel>
</rss>

