<?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: DISTINCTCOUNTNOBLANK count the 0 as blank why ?? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DISTINCTCOUNTNOBLANK-count-the-0-as-blank-why/m-p/1943607#M42303</link>
    <description>&lt;P&gt;Can you give an example of a table where this happens so we can try to reproduce what you describe?&lt;/P&gt;</description>
    <pubDate>Wed, 07 Jul 2021 16:38:18 GMT</pubDate>
    <dc:creator>AlexisOlson</dc:creator>
    <dc:date>2021-07-07T16:38:18Z</dc:date>
    <item>
      <title>DISTINCTCOUNTNOBLANK count the 0 as blank why ??</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DISTINCTCOUNTNOBLANK-count-the-0-as-blank-why/m-p/1943595#M42299</link>
      <description>&lt;P&gt;Hello to all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm writing to you because my query below doesn't work anymore for some time (an update of power bi maybe ?). Indeed I created this query to count the number of non empty values in a column. This query was working, it was counting the values at 0 as a value but recently it considers the values at 0 as a "blank".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my query:&lt;/P&gt;&lt;P&gt;SUMX(&lt;BR /&gt;SUMMARIZE(&lt;BR /&gt;VALUES(dim_measure_faucon[libelle_mesure]),dim_measure_faucon[libelle_mesure],&lt;BR /&gt;"Pmoy",&lt;BR /&gt;CALCULATE(DISTINCTCOUNTNOBLANK(fact_measure_points_faucon[dt (10 min)]),FILTER(fact_measure_points_faucon,fact_measure_points_faucon[value]&amp;lt;&amp;gt;BLANK())&lt;BR /&gt;),&lt;BR /&gt;[Pmoy]&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please explain me why?&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Joël&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 16:31:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DISTINCTCOUNTNOBLANK-count-the-0-as-blank-why/m-p/1943595#M42299</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-07-07T16:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: DISTINCTCOUNTNOBLANK count the 0 as blank why ??</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DISTINCTCOUNTNOBLANK-count-the-0-as-blank-why/m-p/1943607#M42303</link>
      <description>&lt;P&gt;Can you give an example of a table where this happens so we can try to reproduce what you describe?&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 16:38:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DISTINCTCOUNTNOBLANK-count-the-0-as-blank-why/m-p/1943607#M42303</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2021-07-07T16:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: DISTINCTCOUNTNOBLANK count the 0 as blank why ??</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DISTINCTCOUNTNOBLANK-count-the-0-as-blank-why/m-p/1943620#M42304</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="39298" data-lia-user-login="AlexisOlson" class="lia-mention lia-mention-user"&gt;AlexisOlson&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately I can't share my pbix but here is my table "fact_points_measures_faucon" in the image below :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;BR /&gt;And here is my "dim_measure_faucon" table&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;BR /&gt;I hope this can help you !&lt;/P&gt;&lt;P&gt;Thanks in advance !&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 16:44:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DISTINCTCOUNTNOBLANK-count-the-0-as-blank-why/m-p/1943620#M42304</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-07-07T16:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: DISTINCTCOUNTNOBLANK count the 0 as blank why ??</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DISTINCTCOUNTNOBLANK-count-the-0-as-blank-why/m-p/1943633#M42305</link>
      <description>&lt;P&gt;First, the expression you've given is syntactically incorrect. &lt;STRONG&gt;Second, you should never, under any circumstances, use SUMMARIZE to do calculation in it&lt;/STRONG&gt;. This function is predictable and relatively fast only when doing grouping with it. Do any other thing with it and you're out of luck. It means that even if today the function seems to do what you expect it to, tomorrow it will not be and you won't even notice it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please remove the calculation from under SUMMARIZE and use the ADDCOLUMNS/SUMMARIZE hybrid instead. However, I can see you don't even need SUMMARIZE in there for grouping. A simple VALUES or DISTINCT is enough.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't do anything more for you since the formula itself is not even correct syntactically, as I said.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By the way, if you want to really see how complex the SUMMARIZE function really is and how unpredictable its output can be, please get familiar with this:&amp;nbsp;&lt;A href="https://www.sqlbi.com/articles/all-the-secrets-of-summarize/" target="_blank"&gt;All the secrets of SUMMARIZE - SQLBI&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here's the closing remarks from &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="71" data-lia-user-login="AlbertoFerrari" class="lia-mention lia-mention-user"&gt;AlbertoFerrari&lt;/a&gt;:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 16:59:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DISTINCTCOUNTNOBLANK-count-the-0-as-blank-why/m-p/1943633#M42305</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-07-07T16:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: DISTINCTCOUNTNOBLANK count the 0 as blank why ??</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DISTINCTCOUNTNOBLANK-count-the-0-as-blank-why/m-p/1943649#M42307</link>
      <description>&lt;P&gt;You can try this:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;SUMX(
    VALUES(dim_measure_faucon[libelle_mesure]),
    CALCULATE(
        DISTINCTCOUNTNOBLANK(fact_measure_points_faucon[dt (10 min)]),
        KEEPFILTERS(
            NOT ISBLANK( fact_measure_points_faucon[value] )
        )
    )
)

// Bear in mind that T[C] &amp;lt;&amp;gt; BLANK
// also means T[C] &amp;lt;&amp;gt; 0 since
// BLANK = 0.&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 07 Jul 2021 17:08:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DISTINCTCOUNTNOBLANK-count-the-0-as-blank-why/m-p/1943649#M42307</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-07-07T17:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: DISTINCTCOUNTNOBLANK count the 0 as blank why ??</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DISTINCTCOUNTNOBLANK-count-the-0-as-blank-why/m-p/1943688#M42308</link>
      <description>&lt;P&gt;Hello&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, it works. I didn't know that "summarize" was a function not to be used for calculations, when should it be used? Secondly, what do you call the hybrid function "ADDCOLUMNS/SUMMARIZE" please?&lt;/P&gt;&lt;P&gt;Thank you for your generous help, it helped me a lot!&lt;/P&gt;&lt;P&gt;Joël&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 17:25:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DISTINCTCOUNTNOBLANK-count-the-0-as-blank-why/m-p/1943688#M42308</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-07-07T17:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: DISTINCTCOUNTNOBLANK count the 0 as blank why ??</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DISTINCTCOUNTNOBLANK-count-the-0-as-blank-why/m-p/1943706#M42310</link>
      <description>&lt;P&gt;Please read thoroughly all my replies and always follow the links that I place in there. Then everything will become clear.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 17:44:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DISTINCTCOUNTNOBLANK-count-the-0-as-blank-why/m-p/1943706#M42310</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-07-07T17:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: DISTINCTCOUNTNOBLANK count the 0 as blank why ??</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DISTINCTCOUNTNOBLANK-count-the-0-as-blank-why/m-p/1943822#M42315</link>
      <description>&lt;P&gt;Sorry&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp; I didn't see the whole of your answer,&lt;/P&gt;&lt;P&gt;Thanks again for your help,&lt;/P&gt;&lt;P&gt;Have a nice day,&lt;/P&gt;&lt;P&gt;Joël&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 19:22:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DISTINCTCOUNTNOBLANK-count-the-0-as-blank-why/m-p/1943822#M42315</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-07-07T19:22:09Z</dc:date>
    </item>
  </channel>
</rss>

