<?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: DAX: How to count customers who buys the month of april only and not the others. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-to-count-customers-who-buys-the-month-of-april-only-and/m-p/3365711#M126554</link>
    <description>&lt;P&gt;Please try the following,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Count of People = 

var _OtherCustomers = 
    CALCULATETABLE(
        VALUES('Table'[Customer]), 
        'Table'[Month of purchase] &amp;lt; 4
    )

var _Result =
    COUNTROWS(
        SUMMARIZE(
            FILTER(
                'Table', 
                'Table'[Month of purchase] = 4
                &amp;amp;&amp;amp;
                NOT('Table'[Customer] in _OtherCustomers)
            ), 
            'Table'[Customer]
        )
    )

return _Result&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The idea is to,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Find out the Customers who have purchases in the Months less than "4"&lt;/LI&gt;&lt;LI&gt;Filter the Table to only find the people who have done purchases in the Month = 4 and also filter out those Customers in this table who belong to the first list (_OtherCustomers as caluclated above)&lt;/LI&gt;&lt;LI&gt;Summarize this resultant table based upon Customer (so as to find unique number of Customers)&lt;/LI&gt;&lt;LI&gt;Finally count the Rows in the summarized table. This should give you your final answer.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 04 Aug 2023 14:55:26 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-08-04T14:55:26Z</dc:date>
    <item>
      <title>DAX: How to count customers who buys the month of april only and not the others.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-to-count-customers-who-buys-the-month-of-april-only-and/m-p/3365659#M126552</link>
      <description>&lt;P&gt;Hi everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an issue on DAX that I can't solve, maybe someone could help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my example&lt;/P&gt;&lt;P&gt;My problem: I would like to count the number of new customers who bought in April ONLY and not during previous months.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In our case, 2 new customers (customer C &amp;amp; D)&lt;/P&gt;&lt;P&gt;Let's imagine a purchase teble like below:&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Customer&lt;/TD&gt;&lt;TD&gt;Month of purchase&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 04 Aug 2023 14:25:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-to-count-customers-who-buys-the-month-of-april-only-and/m-p/3365659#M126552</guid>
      <dc:creator>Charles59</dc:creator>
      <dc:date>2023-08-04T14:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: DAX: How to count customers who buys the month of april only and not the others.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-to-count-customers-who-buys-the-month-of-april-only-and/m-p/3365711#M126554</link>
      <description>&lt;P&gt;Please try the following,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Count of People = 

var _OtherCustomers = 
    CALCULATETABLE(
        VALUES('Table'[Customer]), 
        'Table'[Month of purchase] &amp;lt; 4
    )

var _Result =
    COUNTROWS(
        SUMMARIZE(
            FILTER(
                'Table', 
                'Table'[Month of purchase] = 4
                &amp;amp;&amp;amp;
                NOT('Table'[Customer] in _OtherCustomers)
            ), 
            'Table'[Customer]
        )
    )

return _Result&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The idea is to,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Find out the Customers who have purchases in the Months less than "4"&lt;/LI&gt;&lt;LI&gt;Filter the Table to only find the people who have done purchases in the Month = 4 and also filter out those Customers in this table who belong to the first list (_OtherCustomers as caluclated above)&lt;/LI&gt;&lt;LI&gt;Summarize this resultant table based upon Customer (so as to find unique number of Customers)&lt;/LI&gt;&lt;LI&gt;Finally count the Rows in the summarized table. This should give you your final answer.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2023 14:55:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-to-count-customers-who-buys-the-month-of-april-only-and/m-p/3365711#M126554</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-04T14:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: DAX: How to count customers who buys the month of april only and not the others.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-to-count-customers-who-buys-the-month-of-april-only-and/m-p/3366124#M126576</link>
      <description>&lt;LI-CODE lang="markup"&gt;Apr ONLY = 
CONCATENATEX(
    FILTER(
        CALCULATETABLE( VALUES( SALES[Customer] ), SALES[Month of purchase] = 4 ),
        CALCULATE( ISEMPTY( SALES ), SALES[Month of purchase] &amp;lt;&amp;gt; 4 )
    ),
    SALES[Customer],
    ", "
)&lt;/LI-CODE&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2023 20:13:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-to-count-customers-who-buys-the-month-of-april-only-and/m-p/3366124#M126576</guid>
      <dc:creator>ThxAlot</dc:creator>
      <dc:date>2023-08-04T20:13:55Z</dc:date>
    </item>
  </channel>
</rss>

