<?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/COUNTROWS return 0 instead of blank in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-COUNTROWS-return-0-instead-of-blank/m-p/2641144#M77547</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="297582" data-lia-user-login="afbraga66" class="lia-mention lia-mention-user"&gt;afbraga66&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the table itself is empty in the current &amp;nbsp;filter context then you need to keep the result blank. You need to have it zero if only the filtered table by CALCULATE is blank. Just pay attention to the difference between the original table and the filtered table.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Jul 2022 10:33:08 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2022-07-15T10:33:08Z</dc:date>
    <item>
      <title>COUNT/COUNTROWS return 0 instead of blank</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-COUNTROWS-return-0-instead-of-blank/m-p/2640959#M77531</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am currently have an issue with count/countrows. When they evaluate and return nothing it shows blank instead of 0.&lt;/P&gt;&lt;P&gt;I have 2 tables, a calendar table and a fact table with 10 rows.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I am trying to calculate the percentage of colum ORIT = "Y".&lt;/P&gt;&lt;PRE&gt;Lines ORIT2 = &lt;BR /&gt;var _orit = CALCULATE(COUNTROWS(dataVN),dataVN[ORIT]="Y")&lt;BR /&gt;&lt;BR /&gt;return if(ISBLANK(_orit),0,_orit)&lt;/PRE&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;The result is this. I don't want those extra lines that mean nothing.&lt;/P&gt;&lt;img /&gt;&lt;P&gt;The manufacturing data field comes from the calendar table.&lt;/P&gt;&lt;P&gt;How can I avoid this situation and get the desired result?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The .pbix file is in this link if you want to try - &lt;A href="https://we.tl/t-bHGwtdUf5d" target="_blank"&gt;https://we.tl/t-bHGwtdUf5d&lt;/A&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;André&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 15 Jul 2022 09:33:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-COUNTROWS-return-0-instead-of-blank/m-p/2640959#M77531</guid>
      <dc:creator>afbraga66</dc:creator>
      <dc:date>2022-07-15T09:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: COUNT/COUNTROWS return 0 instead of blank</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-COUNTROWS-return-0-instead-of-blank/m-p/2641067#M77542</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="297582" data-lia-user-login="afbraga66" class="lia-mention lia-mention-user"&gt;afbraga66&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please try&amp;nbsp;&lt;A href="https://www.dropbox.com/t/Fm7RwOsIaqz2Duog" target="_blank"&gt;https://www.dropbox.com/t/Fm7RwOsIaqz2Duog&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Lines ORIT2 =
IF (
    NOT ISEMPTY ( dataVN ),
    COALESCE ( CALCULATE ( COUNTROWS ( dataVN ), dataVN[ORIT] = "Y" ), 0 )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2022 10:10:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-COUNTROWS-return-0-instead-of-blank/m-p/2641067#M77542</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-07-15T10:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: COUNT/COUNTROWS return 0 instead of blank</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-COUNTROWS-return-0-instead-of-blank/m-p/2641133#M77546</link>
      <description>&lt;P&gt;HI &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt; , It works thank you so much! Still, I'm intrigued on what is the role of ISEMPTY() and why without it, it doesn't work. Could you explain, please? Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2022 10:28:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-COUNTROWS-return-0-instead-of-blank/m-p/2641133#M77546</guid>
      <dc:creator>afbraga66</dc:creator>
      <dc:date>2022-07-15T10:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: COUNT/COUNTROWS return 0 instead of blank</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-COUNTROWS-return-0-instead-of-blank/m-p/2641144#M77547</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="297582" data-lia-user-login="afbraga66" class="lia-mention lia-mention-user"&gt;afbraga66&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the table itself is empty in the current &amp;nbsp;filter context then you need to keep the result blank. You need to have it zero if only the filtered table by CALCULATE is blank. Just pay attention to the difference between the original table and the filtered table.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2022 10:33:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-COUNTROWS-return-0-instead-of-blank/m-p/2641144#M77547</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-07-15T10:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: COUNT/COUNTROWS return 0 instead of blank</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-COUNTROWS-return-0-instead-of-blank/m-p/2642330#M77622</link>
      <description>&lt;LI-CODE lang="markup"&gt;CALCULATE(COUNTROWS(dataVN),dataVN[ORIT]="Y") + 0&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 16 Jul 2022 00:40:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-COUNTROWS-return-0-instead-of-blank/m-p/2642330#M77622</guid>
      <dc:creator>vapid128</dc:creator>
      <dc:date>2022-07-16T00:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: COUNT/COUNTROWS return 0 instead of blank</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-COUNTROWS-return-0-instead-of-blank/m-p/4252402#M168412</link>
      <description>&lt;P&gt;This is by far the fastest and cleanest solution so far.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 09:59:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-COUNTROWS-return-0-instead-of-blank/m-p/4252402#M168412</guid>
      <dc:creator>admdc01</dc:creator>
      <dc:date>2024-10-22T09:59:46Z</dc:date>
    </item>
    <item>
      <title>Re: COUNT/COUNTROWS return 0 instead of blank</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-COUNTROWS-return-0-instead-of-blank/m-p/4267756#M169209</link>
      <description>&lt;P&gt;Genius&lt;/P&gt;</description>
      <pubDate>Sat, 02 Nov 2024 15:48:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-COUNTROWS-return-0-instead-of-blank/m-p/4267756#M169209</guid>
      <dc:creator>joaotinti</dc:creator>
      <dc:date>2024-11-02T15:48:07Z</dc:date>
    </item>
  </channel>
</rss>

