<?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: Count Number of scores 0-6 but exclude blanks in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Number-of-scores-0-6-but-exclude-blanks/m-p/3994162#M155073</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="470280" data-lia-user-login="BINewbie1" class="lia-mention lia-mention-user"&gt;BINewbie1&lt;/a&gt;&amp;nbsp;Yeah when &amp;lt;&amp;gt; BLANK is used it is filtering out both NULL/BLANK &amp;amp; 0 so you can just use&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;NOT ISBLANK ( 'new_clientsurveys'[bbbc_rategeneralfeelingofwellbeing_display] )&lt;/LI-CODE&gt;&lt;P&gt;When NOT ISBLANK is used it only filters Nulls/Blanks&lt;/P&gt;</description>
    <pubDate>Sat, 15 Jun 2024 06:41:26 GMT</pubDate>
    <dc:creator>AntrikshSharma</dc:creator>
    <dc:date>2024-06-15T06:41:26Z</dc:date>
    <item>
      <title>Count Number of scores 0-6 but exclude blanks</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Number-of-scores-0-6-but-exclude-blanks/m-p/3993900#M155037</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This should be simple but I'm struggling to understand what's going on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table, '&lt;SPAN&gt;new_clientsurveys&lt;/SPAN&gt;' with a field&lt;SPAN&gt;&amp;nbsp;[bbbc_rategeneralfeelingofwellbeing_display] which contains whole numbers in the range 0-6, and a number of blank values.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a measure, that i'm using to count the number of valid survey responses for this survey question.&amp;nbsp;&lt;SPAN&gt;I need this measure to count the number of surveys just excluding the blank values, but also counting the zeros. The measure also filters where the response is part of an initial survey.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;No&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt; Valid Initial Surveys =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;_ValidInitialSurveys&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATETABLE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'new_clientsurveys'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'new_clientsurveys'&lt;/SPAN&gt;&lt;SPAN&gt;[new_of_master_outcome_selector_display]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"Initial Assessment"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'new_clientsurveys'&lt;/SPAN&gt;&lt;SPAN&gt;[bbbc_rategeneralfeelingofwellbeing_display]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;lt;&amp;gt; Blank ()&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CountRows&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;_ValidInitialSurveys&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;It appears that the measure, as well as excluding the blank values, is also excluding the 0 values. I need the measure to count the 0 values.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I tried modifying the measure using&amp;nbsp;'new_clientsurveys'[bbbc_rategeneralfeelingofwellbeing_display]&amp;nbsp;&amp;gt;=0, but this variation counts the blank values, which I need to exclude.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Any thoughts. Happy to upload a data model if needed, but I think its hopefully straightforward for someone with more experience.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I don't really understand why &amp;lt;&amp;gt; Blank would also remove the zeros/ 0s.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Any help appreciated. I messed up because when I built some test measures for this project I hadn't realised that the data included zeros and I didn't include them in my test data. Otherwise I would have caught on to this problem earlier. All good learning I guess.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Adam&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 14 Jun 2024 19:00:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Number-of-scores-0-6-but-exclude-blanks/m-p/3993900#M155037</guid>
      <dc:creator>BINewbie1</dc:creator>
      <dc:date>2024-06-14T19:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: Count Number of scores 0-6 but exclude blanks</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Number-of-scores-0-6-but-exclude-blanks/m-p/3993930#M155040</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="470280" data-lia-user-login="BINewbie1" class="lia-mention lia-mention-user"&gt;BINewbie1&lt;/a&gt;&amp;nbsp;In the UI if you filter&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;'new_clientsurveys'[new_of_master_outcome_selector_display]&amp;nbsp;=&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;"Initial Assessment"&lt;/EM&gt;&lt;/STRONG&gt; does the column &lt;EM&gt;&lt;STRONG&gt;'new_clientsurveys'[bbbc_rategeneralfeelingofwellbeing_display]&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp;show any row with 0?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2024 20:26:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Number-of-scores-0-6-but-exclude-blanks/m-p/3993930#M155040</guid>
      <dc:creator>AntrikshSharma</dc:creator>
      <dc:date>2024-06-14T20:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: Count Number of scores 0-6 but exclude blanks</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Number-of-scores-0-6-but-exclude-blanks/m-p/3993942#M155042</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="236628" data-lia-user-login="AntrikshSharma" class="lia-mention lia-mention-user"&gt;AntrikshSharma&lt;/a&gt;&amp;nbsp;, thanks for engaging.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You mean if i apply the filter in the Table View? Yes, if I filter by&amp;nbsp;&lt;EM&gt;"Initial Assessment" on&amp;nbsp;&lt;/EM&gt;&lt;EM&gt;[new_of_master_outcome_selector_display], and then apply another filter by '0' on the&amp;nbsp;[bbbc_rategeneralfeelingofwellbeing_display]&amp;nbsp;&lt;/EM&gt;then the row count shows up as 32 filtered rows.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There's also 287 rows with Blank values which I don't want to count.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;These are the surveys that the measure is currently missing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Adam&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2024 20:37:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Number-of-scores-0-6-but-exclude-blanks/m-p/3993942#M155042</guid>
      <dc:creator>BINewbie1</dc:creator>
      <dc:date>2024-06-14T20:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: Count Number of scores 0-6 but exclude blanks</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Number-of-scores-0-6-but-exclude-blanks/m-p/3993944#M155044</link>
      <description>&lt;P&gt;Then it looks like there are other active filters in the report due to which 0s aren't counted, in your &lt;SPAN&gt;CALCULATETABLE&amp;nbsp;&lt;/SPAN&gt;add REMOVEFILTERS ( &lt;SPAN&gt;'new_clientsurveys'&amp;nbsp;&lt;/SPAN&gt;) to see if it includes 0s.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2024 20:42:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Number-of-scores-0-6-but-exclude-blanks/m-p/3993944#M155044</guid>
      <dc:creator>AntrikshSharma</dc:creator>
      <dc:date>2024-06-14T20:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: Count Number of scores 0-6 but exclude blanks</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Number-of-scores-0-6-but-exclude-blanks/m-p/3993960#M155045</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="236628" data-lia-user-login="AntrikshSharma" class="lia-mention lia-mention-user"&gt;AntrikshSharma&lt;/a&gt;&amp;nbsp;Thanks for the suggestion. I've tried that and still getting the same results.&lt;/P&gt;&lt;P&gt;I did,&amp;nbsp;&lt;SPAN&gt;REMOVEFILTERS&lt;/SPAN&gt;&lt;SPAN&gt;(new_clientsurveys[bbbc_rategeneralfeelingofwellbeing_display]), as if I remove filters on the whole table then my table visualisation goes all wrong - but still with the wrong number being repeated across my visualisation.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I've checked all my filters and can't see anything that would cause this in terms of the filters in the visualisations.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm pretty sure that using the &amp;lt;&amp;gt; operator and Blank, removes zeros as well as Blanks. There's a suggestion at the link below that when counting Blanks to use a == operator for 'strictly equal to', so that zeros and Blank values are treated differently. But I need the negative of this - 'not strictly equal to'. Any ideas?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://dax.guide/op/not-equal-to/" target="_blank" rel="noopener"&gt;https://dax.guide/op/not-equal-to/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2024 21:12:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Number-of-scores-0-6-but-exclude-blanks/m-p/3993960#M155045</guid>
      <dc:creator>BINewbie1</dc:creator>
      <dc:date>2024-06-14T21:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: Count Number of scores 0-6 but exclude blanks</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Number-of-scores-0-6-but-exclude-blanks/m-p/3993962#M155046</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="236628" data-lia-user-login="AntrikshSharma" class="lia-mention lia-mention-user"&gt;AntrikshSharma&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following DAX gives the right result:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;No&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt; Valid Initial Surveys (Test) = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt; _ValidInitialSurveys = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATETABLE&lt;/SPAN&gt;&lt;SPAN&gt;('new_clientsurveys', 'new_clientsurveys'[new_of_master_outcome_selector_display] = &lt;/SPAN&gt;&lt;SPAN&gt;"Initial Assessment"&lt;/SPAN&gt;&lt;SPAN&gt;, new_clientsurveys[bbbc_rategeneralfeelingofwellbeing_display] == &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt; || new_clientsurveys[bbbc_rategeneralfeelingofwellbeing_display] = &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt; || new_clientsurveys[bbbc_rategeneralfeelingofwellbeing_display] = &lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt; || new_clientsurveys[bbbc_rategeneralfeelingofwellbeing_display] = &lt;/SPAN&gt;&lt;SPAN&gt;3&lt;/SPAN&gt;&lt;SPAN&gt; || new_clientsurveys[bbbc_rategeneralfeelingofwellbeing_display] = &lt;/SPAN&gt;&lt;SPAN&gt;4&lt;/SPAN&gt;&lt;SPAN&gt; || new_clientsurveys[bbbc_rategeneralfeelingofwellbeing_display] = &lt;/SPAN&gt;&lt;SPAN&gt;5&lt;/SPAN&gt;&lt;SPAN&gt; || new_clientsurveys[bbbc_rategeneralfeelingofwellbeing_display] = &lt;/SPAN&gt;&lt;SPAN&gt;6&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;COUNTROWS&lt;/SPAN&gt;&lt;SPAN&gt;(_ValidInitialSurveys)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;But seems less than efficient?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Adam&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 14 Jun 2024 21:22:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Number-of-scores-0-6-but-exclude-blanks/m-p/3993962#M155046</guid>
      <dc:creator>BINewbie1</dc:creator>
      <dc:date>2024-06-14T21:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: Count Number of scores 0-6 but exclude blanks</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Number-of-scores-0-6-but-exclude-blanks/m-p/3994162#M155073</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="470280" data-lia-user-login="BINewbie1" class="lia-mention lia-mention-user"&gt;BINewbie1&lt;/a&gt;&amp;nbsp;Yeah when &amp;lt;&amp;gt; BLANK is used it is filtering out both NULL/BLANK &amp;amp; 0 so you can just use&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;NOT ISBLANK ( 'new_clientsurveys'[bbbc_rategeneralfeelingofwellbeing_display] )&lt;/LI-CODE&gt;&lt;P&gt;When NOT ISBLANK is used it only filters Nulls/Blanks&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jun 2024 06:41:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Number-of-scores-0-6-but-exclude-blanks/m-p/3994162#M155073</guid>
      <dc:creator>AntrikshSharma</dc:creator>
      <dc:date>2024-06-15T06:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: Count Number of scores 0-6 but exclude blanks</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Number-of-scores-0-6-but-exclude-blanks/m-p/3994216#M155077</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="236628" data-lia-user-login="AntrikshSharma" class="lia-mention lia-mention-user"&gt;AntrikshSharma&lt;/a&gt;&amp;nbsp;Works perfectly!&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jun 2024 08:59:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Number-of-scores-0-6-but-exclude-blanks/m-p/3994216#M155077</guid>
      <dc:creator>BINewbie1</dc:creator>
      <dc:date>2024-06-15T08:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Count Number of scores 0-6 but exclude blanks</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Number-of-scores-0-6-but-exclude-blanks/m-p/3994265#M155087</link>
      <description>&lt;P&gt;Just to add for anyone else that's affected by this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue with &amp;lt;&amp;gt; Blank() removing 0 as well as blanks only seems to happen when the field format is whole number. I've some similar question scales that are formated as text because they include a n/a&amp;nbsp; i.e. 0 - 4 + n/a. Here the &amp;lt;&amp;gt; Blank () seems to correctly remove the blanks leaving the 0.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jun 2024 10:41:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Number-of-scores-0-6-but-exclude-blanks/m-p/3994265#M155087</guid>
      <dc:creator>BINewbie1</dc:creator>
      <dc:date>2024-06-15T10:41:17Z</dc:date>
    </item>
  </channel>
</rss>

