<?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 STATUS BY CURRENT MONTH in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-STATUS-BY-CURRENT-MONTH/m-p/2818693#M89461</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="424059" data-lia-user-login="third_hicana" class="lia-mention lia-mention-user"&gt;third_hicana&lt;/a&gt; , You can have measure like &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This Month Today = &lt;BR /&gt;var _min = eomonth(today(),-1)+1&lt;BR /&gt;var _max = eomonth(today(),0) &lt;BR /&gt;return CALCULATE(count(Table[Status]) FILTER('Table','Date'[Date Created] &amp;gt;=_min &amp;amp;&amp;amp; 'Table'[Date Created] &amp;lt;= _max))&lt;/P&gt;</description>
    <pubDate>Wed, 05 Oct 2022 03:58:13 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2022-10-05T03:58:13Z</dc:date>
    <item>
      <title>COUNT STATUS BY CURRENT MONTH</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-STATUS-BY-CURRENT-MONTH/m-p/2818634#M89457</link>
      <description>&lt;P&gt;Hi DAX Experts. Seeking for your help with regards to the subject above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically, I have two columns&lt;BR /&gt;&lt;BR /&gt;Column 1 is the Date Created&lt;BR /&gt;Column 2 is the Status (i.e Open, Assigned and Withdrawn)&lt;BR /&gt;&lt;BR /&gt;I wish to count the status for the current month only.&lt;/P&gt;&lt;P&gt;Thank you very much for your help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Sample Data:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Date Created&lt;/TD&gt;&lt;TD&gt;Status&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;05/10/2022&lt;/TD&gt;&lt;TD&gt;Assigned&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;16/10/2022&lt;/TD&gt;&lt;TD&gt;Open&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;20/10/2022&lt;/TD&gt;&lt;TD&gt;Open&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;15/09/2022&lt;/TD&gt;&lt;TD&gt;Withdrawn&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Wed, 05 Oct 2022 03:07:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-STATUS-BY-CURRENT-MONTH/m-p/2818634#M89457</guid>
      <dc:creator>third_hicana</dc:creator>
      <dc:date>2022-10-05T03:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: COUNT STATUS BY CURRENT MONTH</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-STATUS-BY-CURRENT-MONTH/m-p/2818693#M89461</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="424059" data-lia-user-login="third_hicana" class="lia-mention lia-mention-user"&gt;third_hicana&lt;/a&gt; , You can have measure like &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This Month Today = &lt;BR /&gt;var _min = eomonth(today(),-1)+1&lt;BR /&gt;var _max = eomonth(today(),0) &lt;BR /&gt;return CALCULATE(count(Table[Status]) FILTER('Table','Date'[Date Created] &amp;gt;=_min &amp;amp;&amp;amp; 'Table'[Date Created] &amp;lt;= _max))&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 03:58:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-STATUS-BY-CURRENT-MONTH/m-p/2818693#M89461</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-10-05T03:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: COUNT STATUS BY CURRENT MONTH</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-STATUS-BY-CURRENT-MONTH/m-p/2818699#M89462</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp; I forgot to mention. I want to count the per status of current month.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 04:05:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-STATUS-BY-CURRENT-MONTH/m-p/2818699#M89462</guid>
      <dc:creator>third_hicana</dc:creator>
      <dc:date>2022-10-05T04:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: COUNT STATUS BY CURRENT MONTH</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-STATUS-BY-CURRENT-MONTH/m-p/2822038#M89593</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="424059" data-lia-user-login="third_hicana" class="lia-mention lia-mention-user"&gt;third_hicana&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try this method:&lt;/P&gt;
&lt;P&gt;Create a new table first:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table = VALUES('Sample Table'[Status])&lt;/LI-CODE&gt;
&lt;P&gt;And then count the status:&lt;/P&gt;
&lt;P&gt;New Column:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Count per status of current month = CALCULATE(COUNTROWS('Sample Table'),FILTER('Sample Table', MONTH('Sample Table'[Date Created]) = MONTH(TODAY()) &amp;amp;&amp;amp; 'Sample Table'[Status] = 'Table'[Status]))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is that your expect result?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps you.&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 _Yinliw&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 08:14:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-STATUS-BY-CURRENT-MONTH/m-p/2822038#M89593</guid>
      <dc:creator>v-yinliw-msft</dc:creator>
      <dc:date>2022-10-06T08:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: COUNT STATUS BY CURRENT MONTH</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-STATUS-BY-CURRENT-MONTH/m-p/2824459#M89756</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="437717" data-lia-user-login="v-yinliw-msft" class="lia-mention lia-mention-user"&gt;v-yinliw-msft&lt;/a&gt;&amp;nbsp;The Date Created&amp;nbsp; was not able to detect while I'm writing the DAX. I made a relationship between the created Table and the Sample Data. But the month is unknown in DAX. Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 03:54:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-STATUS-BY-CURRENT-MONTH/m-p/2824459#M89756</guid>
      <dc:creator>third_hicana</dc:creator>
      <dc:date>2022-10-07T03:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: COUNT STATUS BY CURRENT MONTH</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-STATUS-BY-CURRENT-MONTH/m-p/2830407#M90148</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="424059" data-lia-user-login="third_hicana" class="lia-mention lia-mention-user"&gt;third_hicana&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try this method:&lt;/P&gt;
&lt;P&gt;First of all, you need to change your date column to format "Date", not "text".&lt;/P&gt;
&lt;P&gt;You can change it by this:&lt;/P&gt;
&lt;P&gt;Right click the column and select Change Type and then Using locale.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a table first:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Status = VALUES('Sample Table'[Status])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then create a measure:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Count_per_status_of_current_month =
CALCULATE (
    COUNTROWS ( 'Sample Table' ),
    FILTER (
        'Sample Table',
        DATEDIFF ( [Date Created], TODAY (), MONTH ) = 1
            &amp;amp;&amp;amp; [Status] = MAX ( 'Status'[Status] )
    )
)
&lt;/LI-CODE&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;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps you.&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 _Yinliw&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2022 09:47:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-STATUS-BY-CURRENT-MONTH/m-p/2830407#M90148</guid>
      <dc:creator>v-yinliw-msft</dc:creator>
      <dc:date>2022-11-02T09:47:12Z</dc:date>
    </item>
  </channel>
</rss>

