<?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 rows of a summarize table with blank values in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-rows-of-a-summarize-table-with-blank-values/m-p/3807981#M148877</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="237305" data-lia-user-login="kriscoupe" class="lia-mention lia-mention-user"&gt;kriscoupe&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for answering, but it didn't work. It's returning just 1 client and as we can see in the base, there are more than one client categorized as to be rescued.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Apr 2024 13:11:10 GMT</pubDate>
    <dc:creator>Higoricardo</dc:creator>
    <dc:date>2024-04-03T13:11:10Z</dc:date>
    <item>
      <title>Count rows of a summarize table with blank values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-rows-of-a-summarize-table-with-blank-values/m-p/3805722#M148806</link>
      <description>&lt;P&gt;I have a client base with two measures: &lt;U&gt;Sellout Value&lt;/U&gt; and &lt;U&gt;Sellout Value Last Year&lt;/U&gt;, like below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Sellout Value = SUM(SELLOUT_TABLE[SELLOUT_VALUE])&lt;/P&gt;&lt;P&gt;Sellout Value Last Year = CALCULATE([Sellout Value],PREVIOUSYEAR(CALENDAR[Date]))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;An IF measure was created to categorize clients to be rescued, following the logic of those who bought last year but didn’t buy this year.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Client to Rescue = IF([Sellout Value]&amp;lt;=0&amp;amp;&amp;amp;[Sellout Value Last Year]&amp;gt;0,"YES","NO")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The challenge here is to create a measure that counts and consolidate the number of clients which is categorized as a client to be rescued. The measure below was created but the return is resulting as blank.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Clients to Rescue = COUNTROWS(FILTER(ADDCOLUMNS(SUMMARIZE(SELLOUT_TABLE, SELLOUT_TABLE [CLIENT_CODE]), "Sellout Value", [Sellout Value], " Sellout Value Last Year", [Sellout Value Last Year]),[Client to Rescue]="YES"))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any fix in the DAX formulas used or in the base to result the count correctly?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 19:05:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-rows-of-a-summarize-table-with-blank-values/m-p/3805722#M148806</guid>
      <dc:creator>Higoricardo</dc:creator>
      <dc:date>2024-04-02T19:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: Count rows of a summarize table with blank values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-rows-of-a-summarize-table-with-blank-values/m-p/3805920#M148817</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="713461" data-lia-user-login="Higoricardo" class="lia-mention lia-mention-user"&gt;Higoricardo&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, I'm assuming you want to get the number of clients that would have been YES client to rescue. You should be able to achieve this using the following formula.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Number of Clients to Rescue =
COUNTROWS(
    FILTER(
        VALUES( SELLOUT_TABLE[CLIENT_CODE] ),
        [Client to Rescue] = "YES"
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not to sure on your model structure etc. but based on what I see above this should work. Let me know how you get on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it helps,&lt;/P&gt;&lt;P&gt;Kris&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 20:59:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-rows-of-a-summarize-table-with-blank-values/m-p/3805920#M148817</guid>
      <dc:creator>kriscoupe</dc:creator>
      <dc:date>2024-04-02T20:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: Count rows of a summarize table with blank values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-rows-of-a-summarize-table-with-blank-values/m-p/3807981#M148877</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="237305" data-lia-user-login="kriscoupe" class="lia-mention lia-mention-user"&gt;kriscoupe&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for answering, but it didn't work. It's returning just 1 client and as we can see in the base, there are more than one client categorized as to be rescued.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 13:11:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-rows-of-a-summarize-table-with-blank-values/m-p/3807981#M148877</guid>
      <dc:creator>Higoricardo</dc:creator>
      <dc:date>2024-04-03T13:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: Count rows of a summarize table with blank values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-rows-of-a-summarize-table-with-blank-values/m-p/3829625#M149738</link>
      <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="713461" data-lia-user-login="Higoricardo" class="lia-mention lia-mention-user"&gt;Higoricardo&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;1. Create measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Flag =
var _table1=
SUMMARIZE(ALLSELECTED('Table'),[Client Code],"Measure",[Client to Rescue])
var _table2=
FILTER(
    _table1,[Measure]="YES")
return
IF(
MAX('Table'[Client Code]) in SELECTCOLUMNS(_table2,"test",[Client Code]),1,BLANK())&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Clients to Rescue =
CALCULATE(DISTINCTCOUNT('Table'[Client Code]),ALLSELECTED('Table'))&lt;/LI-CODE&gt;
&lt;P&gt;2. Place [Flag]in Filters, set is=1, apply filter.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;3. Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2024 06:35:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-rows-of-a-summarize-table-with-blank-values/m-p/3829625#M149738</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-11T06:35:11Z</dc:date>
    </item>
  </channel>
</rss>

