<?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: A sum of a column with numbers and blank values with a blank result in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-sum-of-a-column-with-numbers-and-blank-values-with-a-blank/m-p/3175921#M114633</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Interesting and unusual requirement &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;You could use COUNTBLANK to determine if at least one BLANK value is present, and if so return BLANK, otherwise return the sum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A concise way of putting it could be:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;SUM modified = 
IF (
    NOT COUNTBLANK ( 'table'[value] ),
    SUM ( 'table'[value] )
)&lt;/LI-CODE&gt;
&lt;P&gt;If the value returned by COUNTBLANK(...) is nonzero, it will be cast to the value TRUE, and then NOT COUNTBLANK(...) will be FALSE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does this work for you?&lt;/P&gt;</description>
    <pubDate>Thu, 06 Apr 2023 12:01:17 GMT</pubDate>
    <dc:creator>OwenAuger</dc:creator>
    <dc:date>2023-04-06T12:01:17Z</dc:date>
    <item>
      <title>A sum of a column with numbers and blank values with a blank result</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-sum-of-a-column-with-numbers-and-blank-values-with-a-blank/m-p/3175351#M114610</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;So the point is that whenever you add numbers together and there is a blank value, the result must always be blank.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;If the blank value does not appear in the sum of the column, then it is a number value.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;How can you manipulate this outcome?&lt;BR /&gt;&lt;BR /&gt;Table&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Category&lt;/TD&gt;&lt;TD&gt;value&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;a&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;b&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;c&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;The sum(table[value])&amp;nbsp;&lt;BR /&gt;total = BLANK&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2023 07:09:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-sum-of-a-column-with-numbers-and-blank-values-with-a-blank/m-p/3175351#M114610</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-06T07:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: A sum of a column with numbers and blank values with a blank result</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-sum-of-a-column-with-numbers-and-blank-values-with-a-blank/m-p/3175921#M114633</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Interesting and unusual requirement &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;You could use COUNTBLANK to determine if at least one BLANK value is present, and if so return BLANK, otherwise return the sum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A concise way of putting it could be:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;SUM modified = 
IF (
    NOT COUNTBLANK ( 'table'[value] ),
    SUM ( 'table'[value] )
)&lt;/LI-CODE&gt;
&lt;P&gt;If the value returned by COUNTBLANK(...) is nonzero, it will be cast to the value TRUE, and then NOT COUNTBLANK(...) will be FALSE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does this work for you?&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2023 12:01:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/A-sum-of-a-column-with-numbers-and-blank-values-with-a-blank/m-p/3175921#M114633</guid>
      <dc:creator>OwenAuger</dc:creator>
      <dc:date>2023-04-06T12:01:17Z</dc:date>
    </item>
  </channel>
</rss>

