<?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 First time orders in a given period in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/First-time-orders-in-a-given-period/m-p/2098099#M47849</link>
    <description>&lt;P&gt;We would like to make a DAX measure that shows users that have had their first order in a period.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried using:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;FirstInteractionDate = CALCULATE(MIN(orders[created_date]),DATESBETWEEN('Date'[Date],MINX(all('Calendar'),'Calendar'[Date]),MAX('Calendar'[Date]))) and New Customers = COUNTROWS(FILTER(VALUES(orders[customer.id]),[FirstInteractionDate] &amp;gt;= MIN('Calendar'[Date]))) to try and calculate it,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but it shows the active users, which are measured with this:&lt;BR /&gt;ordered_user_count = CALCULATE(DISTINCTCOUNT(orders[customer.id]), FILTER(orders, orders[order_count_per_customer] &amp;gt; 0))+0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;with the order_count_per_customer being:&lt;BR /&gt;order_count_per_customer = CALCULATE(COUNTROWS(orders),FILTER(orders,orders[customer.id]=EARLIER(orders[customer.id])))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How would I calculate the first order users in a given period of time?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Sat, 25 Sep 2021 16:59:40 GMT</pubDate>
    <dc:creator>Kareem_Amr_IT</dc:creator>
    <dc:date>2021-09-25T16:59:40Z</dc:date>
    <item>
      <title>First time orders in a given period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/First-time-orders-in-a-given-period/m-p/2098099#M47849</link>
      <description>&lt;P&gt;We would like to make a DAX measure that shows users that have had their first order in a period.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried using:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;FirstInteractionDate = CALCULATE(MIN(orders[created_date]),DATESBETWEEN('Date'[Date],MINX(all('Calendar'),'Calendar'[Date]),MAX('Calendar'[Date]))) and New Customers = COUNTROWS(FILTER(VALUES(orders[customer.id]),[FirstInteractionDate] &amp;gt;= MIN('Calendar'[Date]))) to try and calculate it,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but it shows the active users, which are measured with this:&lt;BR /&gt;ordered_user_count = CALCULATE(DISTINCTCOUNT(orders[customer.id]), FILTER(orders, orders[order_count_per_customer] &amp;gt; 0))+0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;with the order_count_per_customer being:&lt;BR /&gt;order_count_per_customer = CALCULATE(COUNTROWS(orders),FILTER(orders,orders[customer.id]=EARLIER(orders[customer.id])))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How would I calculate the first order users in a given period of time?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 25 Sep 2021 16:59:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/First-time-orders-in-a-given-period/m-p/2098099#M47849</guid>
      <dc:creator>Kareem_Amr_IT</dc:creator>
      <dc:date>2021-09-25T16:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: First time orders in a given period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/First-time-orders-in-a-given-period/m-p/2098105#M47851</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="269406" data-lia-user-login="Kareem_Amr_IT" class="lia-mention lia-mention-user"&gt;Kareem_Amr_IT&lt;/a&gt;&amp;nbsp;Maybe something along the lines of:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
  VAR __MinDateInPeriod = MIN('Calendar'[Date])
  VAR __MaxDateInPeriod = MAX('Calendar'[Date])
  VAR __PreviousCustomers = 
    SELECTCOLUMNS(
      FILTER('orders',[created_date]&amp;lt;__MinDateInPeriod),
      "__customerID",[customer.id]
    )
  VAR __CustomersInPeriod = 
    SELECTCOLUMNS(
      FILTER('orders',[created_date]&amp;gt;=__MinDateInPeriod &amp;amp;&amp;amp; [created_date]&amp;lt;=__MaxDateInPeriod),
      "__customerID",[customer.id]
    )
RETURN
  CONCATENATEX(EXCEPT(__CustomersInPeriod,__PreviousCustomers),[__customerID],", ")&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 25 Sep 2021 17:32:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/First-time-orders-in-a-given-period/m-p/2098105#M47851</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2021-09-25T17:32:48Z</dc:date>
    </item>
  </channel>
</rss>

