<?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: Determining if a new customer has had a sale in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Determining-if-a-new-customer-has-had-a-sale/m-p/2859430#M92032</link>
    <description>&lt;P&gt;Hi Ania,&lt;/P&gt;&lt;P&gt;Thank you for all your hard work.&amp;nbsp; I just have one remaining change, sorry.&lt;/P&gt;&lt;P&gt;For the names of customers with no Last Sale date, I would like to have a separate Table Visualization as below.&amp;nbsp; To this I will add their start date and Last Sale Date of Blank.&lt;/P&gt;&lt;P&gt;I appreciate your help.&amp;nbsp; Thank You. - Bud&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;</description>
    <pubDate>Mon, 24 Oct 2022 14:30:06 GMT</pubDate>
    <dc:creator>BudMan512</dc:creator>
    <dc:date>2022-10-24T14:30:06Z</dc:date>
    <item>
      <title>Determining if a new customer has had a sale</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Determining-if-a-new-customer-has-had-a-sale/m-p/2854506#M91679</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am creating a report of customers gained and lost.&amp;nbsp; Part of the project is for me to determine how many of the customers that have been added have never had a sale since being added as a customer.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I&amp;nbsp; only have a date table and a Customer table.&amp;nbsp; The active relationship is with the Start_Date. The End_Date and Last_Sale_Date are inactive relationships.&lt;/P&gt;&lt;P&gt;I also have a date Slicer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I have used for Gain and Loss DAX&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Gain = DISTINCTCOUNT(Customer[BR_CUSTID])&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Loss = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Customer&lt;/SPAN&gt;&lt;SPAN&gt;[Gain]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;USERELATIONSHIP&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Date'[Date]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Customer[END_DATE]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I have a table below with multiple branches and their customer gains and losses so far in October 2022.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I would like two things if you should be so kind.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;1. A count of how many of the customers gained so far do not have a Last_Sale_Date. I need the Last_Sale_Date to look beyond the date the customer was added.&amp;nbsp; That is if I look at January's gain/loss how many have not had a sale since their Start_Date?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;2. I would like to make a list of the ones that have not had a Last_Sale_Date.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Could someone help me out with the DAX?&amp;nbsp; I am learning as fast as&amp;nbsp; I can but I'm not there&amp;nbsp; yet. I'm&amp;nbsp; 71 so not sure I'll ever get there. ha,ha&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks much,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Bud&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 21:48:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Determining-if-a-new-customer-has-had-a-sale/m-p/2854506#M91679</guid>
      <dc:creator>BudMan512</dc:creator>
      <dc:date>2022-10-20T21:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: Determining if a new customer has had a sale</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Determining-if-a-new-customer-has-had-a-sale/m-p/2854681#M91704</link>
      <description>&lt;P&gt;Hi ,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="299232" data-lia-user-login="BudMan512" class="lia-mention lia-mention-user"&gt;BudMan512&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on your description, I have several doubts:&lt;/P&gt;
&lt;P&gt;(1)In you 'Customer' table ,&amp;nbsp;Which one is the only flag?&amp;nbsp;And whether the fields of this table are related, can you provide sample data for this table?&lt;/P&gt;
&lt;P&gt;(2)In what form you ultimately want the result to be demonstrated?In a table or just in a card?&lt;/P&gt;
&lt;P&gt;(3)For your first requirement, I don't quite understand the final desired result, can you provide us with the sample data you want to output in the form of a table？&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Aniya Zhang&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt; it as the solution&lt;/EM&gt;&amp;nbsp;to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2022 01:51:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Determining-if-a-new-customer-has-had-a-sale/m-p/2854681#M91704</guid>
      <dc:creator>v-yueyunzh-msft</dc:creator>
      <dc:date>2022-10-21T01:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: Determining if a new customer has had a sale</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Determining-if-a-new-customer-has-had-a-sale/m-p/2855722#M91781</link>
      <description>&lt;P&gt;Thanks for the reply Aniya.&lt;/P&gt;&lt;P&gt;1. Each Customer has a Start Date field, an End Date field and a Last Sale Date field.&amp;nbsp; When a new customer is added the Start Date Field is populated with the date.&amp;nbsp; The End Date is populated when a customer is lost.&amp;nbsp; Most customers do not have an End Date.&amp;nbsp; The Last Sale Date indicates when the customer last made a purchase.&amp;nbsp; Sometimes customers are setup with a Start Date but they never make a purchase and so should not really be counted&amp;nbsp; as a Gain.&amp;nbsp; I am trying to identify those.&amp;nbsp; So this is not in DAX terms but I want to identify customers where Start Date is not null and Last Sale Date is Null.&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; I would like to add a column to my table (screenshot above) with a count of the customers added that do have a Start Date but do not have an end date.&amp;nbsp; I also need a list of those customers in a table.&lt;/P&gt;&lt;P&gt;3.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2022 13:05:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Determining-if-a-new-customer-has-had-a-sale/m-p/2855722#M91781</guid>
      <dc:creator>BudMan512</dc:creator>
      <dc:date>2022-10-21T13:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: Determining if a new customer has had a sale</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Determining-if-a-new-customer-has-had-a-sale/m-p/2855729#M91782</link>
      <description>&lt;P&gt;Sorry, in #2, I need to make a correction, it should say:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;I would like to add a column to my table (screenshot above) with a count of the customers added that do have a &lt;STRONG&gt;Start Date&lt;/STRONG&gt; but do not have a &lt;STRONG&gt;Last Sale Date&lt;/STRONG&gt;.&amp;nbsp; I also need a list of those customers in a table.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2022 13:09:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Determining-if-a-new-customer-has-had-a-sale/m-p/2855729#M91782</guid>
      <dc:creator>BudMan512</dc:creator>
      <dc:date>2022-10-21T13:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: Determining if a new customer has had a sale</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Determining-if-a-new-customer-has-had-a-sale/m-p/2857939#M91935</link>
      <description>&lt;P&gt;Hi ,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="299232" data-lia-user-login="BudMan512" class="lia-mention lia-mention-user"&gt;BudMan512&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are the steps you can refer to :&lt;/P&gt;
&lt;P&gt;(1)This is my test data :&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;(2)I create a calendae table like yours and i create a relationship between two tables:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;(3)We can create two measures :&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Gained with no Last Saled Date = var _t =FILTER('Customer' , 'Customer'[START_DATE] &amp;lt;&amp;gt; BLANK()  &amp;amp;&amp;amp; 'Customer'[LAST_SALES_DATE] =BLANK())
return 
COUNTROWS(_t)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Customer Names = var _t =FILTER('Customer' , 'Customer'[START_DATE] &amp;lt;&amp;gt; BLANK()  &amp;amp;&amp;amp; 'Customer'[LAST_SALES_DATE] =BLANK())
return 
CONCATENATEX( _t , [NAME] , ",")&lt;/LI-CODE&gt;
&lt;P&gt;(4) Then we can put the 'Date'[Date] in the slice and the fields we need on the visual and we will meet your need, the result is as follows ：&lt;/P&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;If this method does not meet your needs, you can provide us with your special &lt;STRONG&gt;sample data&lt;/STRONG&gt; and the &lt;STRONG&gt;desired output sample&lt;/STRONG&gt; data in the form of &lt;STRONG&gt;tables&lt;/STRONG&gt;, so that we can better help you solve the problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Aniya Zhang&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt; it as the solution&lt;/EM&gt;&amp;nbsp;to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2022 02:16:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Determining-if-a-new-customer-has-had-a-sale/m-p/2857939#M91935</guid>
      <dc:creator>v-yueyunzh-msft</dc:creator>
      <dc:date>2022-10-24T02:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: Determining if a new customer has had a sale</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Determining-if-a-new-customer-has-had-a-sale/m-p/2859430#M92032</link>
      <description>&lt;P&gt;Hi Ania,&lt;/P&gt;&lt;P&gt;Thank you for all your hard work.&amp;nbsp; I just have one remaining change, sorry.&lt;/P&gt;&lt;P&gt;For the names of customers with no Last Sale date, I would like to have a separate Table Visualization as below.&amp;nbsp; To this I will add their start date and Last Sale Date of Blank.&lt;/P&gt;&lt;P&gt;I appreciate your help.&amp;nbsp; Thank You. - Bud&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;</description>
      <pubDate>Mon, 24 Oct 2022 14:30:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Determining-if-a-new-customer-has-had-a-sale/m-p/2859430#M92032</guid>
      <dc:creator>BudMan512</dc:creator>
      <dc:date>2022-10-24T14:30:06Z</dc:date>
    </item>
    <item>
      <title>Re: Determining if a new customer has had a sale</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Determining-if-a-new-customer-has-had-a-sale/m-p/2860421#M92094</link>
      <description>&lt;P&gt;Hi ,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="299232" data-lia-user-login="BudMan512" class="lia-mention lia-mention-user"&gt;BudMan512&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can click "New Table" in Power BI Desktop and enter this dax:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table = SELECTCOLUMNS( FILTER('Customer','Customer'[START_DATE] &amp;lt;&amp;gt; BLANK() &amp;amp;&amp;amp; 'Customer'[LAST_SALES_DATE] = BLANK()) , "BR_NAME" , [BR_NAME] , "NAME" , [NAME])&lt;/LI-CODE&gt;
&lt;P&gt;Then we can meet your need m the result is as follows:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Aniya Zhang&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt; it as the solution&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>Tue, 25 Oct 2022 02:39:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Determining-if-a-new-customer-has-had-a-sale/m-p/2860421#M92094</guid>
      <dc:creator>v-yueyunzh-msft</dc:creator>
      <dc:date>2022-10-25T02:39:36Z</dc:date>
    </item>
    <item>
      <title>Re: Determining if a new customer has had a sale</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Determining-if-a-new-customer-has-had-a-sale/m-p/2861809#M92177</link>
      <description>&lt;P&gt;Thank you so much for your help.&amp;nbsp; It is truly appreciated.&amp;nbsp; Bud&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2022 13:10:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Determining-if-a-new-customer-has-had-a-sale/m-p/2861809#M92177</guid>
      <dc:creator>BudMan512</dc:creator>
      <dc:date>2022-10-25T13:10:14Z</dc:date>
    </item>
  </channel>
</rss>

