<?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 Dax to get countifs value as im getting in excel in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Dax-to-get-countifs-value-as-im-getting-in-excel/m-p/3121433#M41649</link>
    <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In excel im using formula like&amp;nbsp;=COUNTIFS(O:O,O2,M:M,"in stock") and&amp;nbsp; COUNTIFS(A:A,A2,M:M,"in stock") Kindly let me know how can I replicae the same in Power BI.&lt;/P&gt;</description>
    <pubDate>Thu, 09 Mar 2023 12:30:41 GMT</pubDate>
    <dc:creator>Afaque_Eclerx</dc:creator>
    <dc:date>2023-03-09T12:30:41Z</dc:date>
    <item>
      <title>Dax to get countifs value as im getting in excel</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Dax-to-get-countifs-value-as-im-getting-in-excel/m-p/3121433#M41649</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In excel im using formula like&amp;nbsp;=COUNTIFS(O:O,O2,M:M,"in stock") and&amp;nbsp; COUNTIFS(A:A,A2,M:M,"in stock") Kindly let me know how can I replicae the same in Power BI.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 12:30:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Dax-to-get-countifs-value-as-im-getting-in-excel/m-p/3121433#M41649</guid>
      <dc:creator>Afaque_Eclerx</dc:creator>
      <dc:date>2023-03-09T12:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: Dax to get countifs value as im getting in excel</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Dax-to-get-countifs-value-as-im-getting-in-excel/m-p/3127152#M41697</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/526777"&gt;@Afaque_Eclerx&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Firstly, I suggest you to add an index column in Power BI, due to the calculation in Power BI is based on column.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RicoZhou_0-1678693311616.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/885619i754C58A0C862F96B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RicoZhou_0-1678693311616.png" alt="RicoZhou_0-1678693311616.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Convert&amp;nbsp;&lt;SPAN&gt;=COUNTIFS(O:O,O2,M:M,"in stock")&amp;nbsp;to a measure:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Countif = 
VAR _O2 = CALCULATE(MAX('Table'[O]),'Table'[Index] = 1)
return
CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[O] = _O2 &amp;amp;&amp;amp; 'Table'[M] = "in stock"))&lt;/LI-CODE&gt;
&lt;P&gt;My Sample:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RicoZhou_1-1678693565643.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/885622i1E51B6FF9903CF0D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RicoZhou_1-1678693565643.png" alt="RicoZhou_1-1678693565643.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Result is as below.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RicoZhou_2-1678693572508.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/885623i8EF2CAB4BAA06CD3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RicoZhou_2-1678693572508.png" alt="RicoZhou_2-1678693572508.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2023 07:46:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Dax-to-get-countifs-value-as-im-getting-in-excel/m-p/3127152#M41697</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-03-13T07:46:58Z</dc:date>
    </item>
  </channel>
</rss>

