<?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 Count Based on specific values in column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Based-on-specific-values-in-column/m-p/2103726#M48015</link>
    <description>&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;I have a&amp;nbsp; table of cars and thier Models (Which i have attached ). I am trying to get a count of only the cars that have the "Fault " Value in them. For example, Toyota should completely be excluded from the count in the 'Count of Car Model' since none of its cars have 'Fault' in the 'Car Model" column. So the result should be :Total Count should be "7" and toyota should not show up in the 'Cars" column at all.&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;img /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 28 Sep 2021 18:32:54 GMT</pubDate>
    <dc:creator>alawode</dc:creator>
    <dc:date>2021-09-28T18:32:54Z</dc:date>
    <item>
      <title>Count Based on specific values in column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Based-on-specific-values-in-column/m-p/2103726#M48015</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;I have a&amp;nbsp; table of cars and thier Models (Which i have attached ). I am trying to get a count of only the cars that have the "Fault " Value in them. For example, Toyota should completely be excluded from the count in the 'Count of Car Model' since none of its cars have 'Fault' in the 'Car Model" column. So the result should be :Total Count should be "7" and toyota should not show up in the 'Cars" column at all.&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 18:32:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Based-on-specific-values-in-column/m-p/2103726#M48015</guid>
      <dc:creator>alawode</dc:creator>
      <dc:date>2021-09-28T18:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: Count Based on specific values in column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Based-on-specific-values-in-column/m-p/2104485#M48047</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="316878" data-lia-user-login="alawode" class="lia-mention lia-mention-user"&gt;alawode&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can write below measure for getting required output:-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Fault_Car = 
VAR _max =
    MAX ( Car_detail[Car] )
VAR result =
    CALCULATE (
        COUNTROWS ( Car_detail ),
        FILTER (
            ALL ( Car_detail ),
            Car_detail[Car] = _max
                &amp;amp;&amp;amp; Car_detail[Model] = "fault"
        )
    )
RETURN
    IF ( ISBLANK ( result ), 0, result )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output:-&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;As you can see total not showing correct so for that you need to write another measure:-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Corrected_total = 
SUMX (
    SUMMARIZE ( Car_detail, Car_detail[Car], Car_detail[Model], "Sum", [Fault_Car] ),
    [Sum]
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output:-&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Note:- Both measure need to create to get a final ouput.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Samarth&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 04:56:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Based-on-specific-values-in-column/m-p/2104485#M48047</guid>
      <dc:creator>Samarth_18</dc:creator>
      <dc:date>2021-09-29T04:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: Count Based on specific values in column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Based-on-specific-values-in-column/m-p/2106034#M48111</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="312802" data-lia-user-login="Samarth_18" class="lia-mention lia-mention-user"&gt;Samarth_18&lt;/a&gt;Thanks a lot for this, it worked well&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 15:01:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Based-on-specific-values-in-column/m-p/2106034#M48111</guid>
      <dc:creator>alawode</dc:creator>
      <dc:date>2021-09-29T15:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Count Based on specific values in column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Based-on-specific-values-in-column/m-p/2108293#M48204</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="312802" data-lia-user-login="Samarth_18" class="lia-mention lia-mention-user"&gt;Samarth_18&lt;/a&gt;&amp;nbsp; Thanks for the help, quick question, for some reason the formula is not picking up 20 cars in the bigger table, and all of them have "fault", do you know how to tweak the expression to recify the issue? Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 30 Sep 2021 13:23:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Based-on-specific-values-in-column/m-p/2108293#M48204</guid>
      <dc:creator>alawode</dc:creator>
      <dc:date>2021-09-30T13:23:07Z</dc:date>
    </item>
  </channel>
</rss>

