<?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 Helping creating measure that counts customers dynamically in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Helping-creating-measure-that-counts-customers-dynamically/m-p/885330#M7654</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need some help with creating a &lt;STRONG&gt;measure&lt;/STRONG&gt; to do the following.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following table with &lt;U&gt;unique customers&lt;/U&gt; and &lt;U&gt;unique dates&lt;/U&gt;:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Customer&lt;/TD&gt;&lt;TD&gt;Last Customer Transaction&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;1-Dec-19&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;1-Dec-19&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;1-Dec-19&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;TD&gt;1-Dec-19&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;E&lt;/TD&gt;&lt;TD&gt;1-Nov-19&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;F&lt;/TD&gt;&lt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/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to &lt;STRONG&gt;count the number of customers&lt;/STRONG&gt; in which its last transaction was within one year:&lt;/P&gt;&lt;P&gt;For instance:&lt;/P&gt;&lt;P&gt;If we consider December 2019 = 16 customers (From A to P)&lt;/P&gt;&lt;P&gt;If we consider November 2019 = 13 customers&amp;nbsp; (From E to Q)&lt;/P&gt;&lt;P&gt;If we consider October 2019 = 13 customers&amp;nbsp; (From F to R)&lt;/P&gt;&lt;P&gt;If we consider Septmber2019 = 11 customers&amp;nbsp;(From I to S)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much and any help would be much appreciated.&lt;/P&gt;</description>
    <pubDate>Fri, 27 Dec 2019 16:51:18 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-12-27T16:51:18Z</dc:date>
    <item>
      <title>Helping creating measure that counts customers dynamically</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Helping-creating-measure-that-counts-customers-dynamically/m-p/885330#M7654</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need some help with creating a &lt;STRONG&gt;measure&lt;/STRONG&gt; to do the following.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following table with &lt;U&gt;unique customers&lt;/U&gt; and &lt;U&gt;unique dates&lt;/U&gt;:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Customer&lt;/TD&gt;&lt;TD&gt;Last Customer Transaction&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;1-Dec-19&lt;/TD&gt;&lt;/T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/TD&gt;&lt;TD&gt;1-Dec-18&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Q&lt;/TD&gt;&lt;TD&gt;1-Nov-18&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;R&lt;/TD&gt;&lt;TD&gt;1-Oct-18&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;S&lt;/TD&gt;&lt;TD&gt;1-Sep-18&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;T&lt;/TD&gt;&lt;TD&gt;1-Aug-18&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to &lt;STRONG&gt;count the number of customers&lt;/STRONG&gt; in which its last transaction was within one year:&lt;/P&gt;&lt;P&gt;For instance:&lt;/P&gt;&lt;P&gt;If we consider December 2019 = 16 customers (From A to P)&lt;/P&gt;&lt;P&gt;If we consider November 2019 = 13 customers&amp;nbsp; (From E to Q)&lt;/P&gt;&lt;P&gt;If we consider October 2019 = 13 customers&amp;nbsp; (From F to R)&lt;/P&gt;&lt;P&gt;If we consider Septmber2019 = 11 customers&amp;nbsp;(From I to S)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much and any help would be much appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2019 16:51:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Helping-creating-measure-that-counts-customers-dynamically/m-p/885330#M7654</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-27T16:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: Helping creating measure that counts customers dynamically</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Helping-creating-measure-that-counts-customers-dynamically/m-p/885334#M7655</link>
      <description>&lt;P&gt;I forgot to mentioned that I would like to have as a final result the following table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;December 2019&lt;/TD&gt;&lt;TD&gt;November 2019&lt;/TD&gt;&lt;TD&gt;October 2019&lt;/TD&gt;&lt;TD&gt;September 2019&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Count&lt;/TD&gt;&lt;TD&gt;16&lt;/TD&gt;&lt;TD&gt;13&lt;/TD&gt;&lt;TD&gt;13&lt;/TD&gt;&lt;TD&gt;11&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2019 17:00:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Helping-creating-measure-that-counts-customers-dynamically/m-p/885334#M7655</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-27T17:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: Helping creating measure that counts customers dynamically</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Helping-creating-measure-that-counts-customers-dynamically/m-p/885444#M7661</link>
      <description>&lt;P&gt;I have imported your data as &lt;STRONG&gt;Table1&lt;/STRONG&gt; and created the following measure:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure = 
IF(HASONEVALUE(Table1[Last Customer Transaction]), 
    COUNTROWS(
        FILTER(ALL(Table1), 
        Table1[Last Customer Transaction] &amp;gt;= SELECTEDVALUE(Table1[Last Customer Transaction])-365 
        &amp;amp;&amp;amp; Table1[Last Customer Transaction] &amp;lt;= SELECTEDVALUE(Table1[Last Customer Transaction]))
    ), BLANK()
)&lt;/LI-CODE&gt;&lt;P&gt;This resulted in the following Matrix visual, when filtered on the top 4 [Last Customer Transaction] using the FIlter pane.:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Let me know if this works for you! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;Djerro123&lt;/P&gt;&lt;P&gt;-------------------------------&lt;/P&gt;&lt;P&gt;If this answered your question, please &lt;STRONG&gt;mark it as the Solution&lt;/STRONG&gt;. This also helps others to find what they are looking for.&lt;/P&gt;&lt;P&gt;Keep those &lt;STRONG&gt;thumbs up&lt;/STRONG&gt; coming! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2019 21:39:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Helping-creating-measure-that-counts-customers-dynamically/m-p/885444#M7661</guid>
      <dc:creator>JarroVGIT</dc:creator>
      <dc:date>2019-12-27T21:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: Helping creating measure that counts customers dynamically</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Helping-creating-measure-that-counts-customers-dynamically/m-p/889280#M7794</link>
      <description>&lt;P&gt;Thank you so much for your help. It worked &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jan 2020 16:41:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Helping-creating-measure-that-counts-customers-dynamically/m-p/889280#M7794</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-03T16:41:30Z</dc:date>
    </item>
  </channel>
</rss>

