<?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 Counta with conditions in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counta-with-conditions/m-p/2561240#M72866</link>
    <description>&lt;P&gt;Morning Guys, hope its all well!&lt;/P&gt;&lt;P&gt;I have a query where I need a Count of employee role id's. There is a column with the role id and another one with the role names.&lt;/P&gt;&lt;P&gt;I need to be able to do the count based on, for example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When the measure Counts the total of role ids associated to a particular employee name&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Column Role Names&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Group Leader&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Member&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Business unit Leader&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In some cases Business unit leader and group leader should considered as the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll appreciate if anyone has some feedback.&lt;/P&gt;&lt;P&gt;Have a great day &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jun 2022 13:30:38 GMT</pubDate>
    <dc:creator>L-P</dc:creator>
    <dc:date>2022-06-06T13:30:38Z</dc:date>
    <item>
      <title>Counta with conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counta-with-conditions/m-p/2561240#M72866</link>
      <description>&lt;P&gt;Morning Guys, hope its all well!&lt;/P&gt;&lt;P&gt;I have a query where I need a Count of employee role id's. There is a column with the role id and another one with the role names.&lt;/P&gt;&lt;P&gt;I need to be able to do the count based on, for example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When the measure Counts the total of role ids associated to a particular employee name&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Column Role Names&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Group Leader&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Member&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Business unit Leader&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In some cases Business unit leader and group leader should considered as the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll appreciate if anyone has some feedback.&lt;/P&gt;&lt;P&gt;Have a great day &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2022 13:30:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counta-with-conditions/m-p/2561240#M72866</guid>
      <dc:creator>L-P</dc:creator>
      <dc:date>2022-06-06T13:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: Counta with conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counta-with-conditions/m-p/2561255#M72868</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="397657" data-lia-user-login="L-P" class="lia-mention lia-mention-user"&gt;L-P&lt;/a&gt;&amp;nbsp;You can use the pattern COUNTAX(FILTER(...),...) or CALCULATE(COUNTA(...),...)&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/CO-CU-Excel-to-DAX-Translation/ba-p/1080018#M2077" target="_blank"&gt;(1) CO-CU Excel to DAX Translation - Microsoft Power BI Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2022 13:34:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counta-with-conditions/m-p/2561255#M72868</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2022-06-06T13:34:19Z</dc:date>
    </item>
    <item>
      <title>Re: Counta with conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counta-with-conditions/m-p/2561468#M72883</link>
      <description>&lt;P&gt;Thanks, &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="6614" data-lia-user-login="Greg" class="lia-mention lia-mention-user"&gt;Greg&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;So far no luck!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 06 Jun 2022 14:54:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counta-with-conditions/m-p/2561468#M72883</guid>
      <dc:creator>L-P</dc:creator>
      <dc:date>2022-06-06T14:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: Counta with conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counta-with-conditions/m-p/2568021#M73230</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="397657" data-lia-user-login="L-P" class="lia-mention lia-mention-user"&gt;L-P&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you would like to count role id for different role names, you may try this Measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Count on roles names = CALCULATE(COUNT('Table'[role id]),ALLEXCEPT('Table','Table'[role names]))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you would like to count role id for one specific role name, you can try this Measure and make some changes per your needs.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Count for one role name = CALCULATE(COUNT('Table'[role id]),FILTER( ALL('Table'),'Table'[role names]="lisa"))

&lt;/LI-CODE&gt;
&lt;P&gt;Sample data:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, attached the pbix file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider&lt;STRONG&gt; Accept it as the solution&lt;/STRONG&gt; to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _ Caiyun&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2022 05:33:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counta-with-conditions/m-p/2568021#M73230</guid>
      <dc:creator>v-cazheng-msft</dc:creator>
      <dc:date>2022-06-09T05:33:44Z</dc:date>
    </item>
  </channel>
</rss>

