<?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: calculate active customers previous month and current month in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-active-customers-previous-month-and-current-month/m-p/2122551#M48680</link>
    <description>&lt;P&gt;yes, I want the cumulative distinct count of active users for the current month and the previous month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Oct 2021 21:11:46 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-10-07T21:11:46Z</dc:date>
    <item>
      <title>calculate active customers previous month and current month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-active-customers-previous-month-and-current-month/m-p/2122261#M48656</link>
      <description>&lt;P&gt;I have 3 columns&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and I want to get active customers for current month where status = "won"&lt;/P&gt;&lt;P&gt;and active customers for previous month where status = "won"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for current month im using&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ActiveMembers = CALCULATE(DISTINCTCOUNT(Table[Customer]),PARALLELPERIOD(table[Date],0,MONTH),FILTER(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Table','table'[Status] ="won" ))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;and it's working fine.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;but i have getting no value for previous month and I'm using:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ActiveMemberPreviousMonth = CALCULATE(DISTINCTCOUNT('table'[Customer]),PREVIOUSMONTH('table'[Date]), FILTER('table','table'[Status]="Won"))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Problem statement: I want help to get current active member and previous month active member where status = "Won"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;expected solution:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;eg: if today is 12 March 2021:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I want active users of the current month March 2021: 5364 users&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;and previous month i.e Feb 2021 :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;active users 3265 users.&lt;/STRONG&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;my example data for the table is shown below&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&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;&amp;nbsp;date&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;status&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;xyz&lt;/TD&gt;&lt;TD&gt;03-01-2018&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;won&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;abc&lt;/TD&gt;&lt;TD&gt;03-01-2018&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;lost&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;efd&lt;/TD&gt;&lt;TD&gt;03-01-2018&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;won&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ghy&lt;/TD&gt;&lt;TD&gt;03-01-2018&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;lost&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;tgh&lt;/TD&gt;&lt;TD&gt;05-02-2018&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;won&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;fht&lt;/TD&gt;&lt;TD&gt;01-01-2019&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;won&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Thu, 07 Oct 2021 22:03:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-active-customers-previous-month-and-current-month/m-p/2122261#M48656</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-10-07T22:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: calculate active customers previous month and current month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-active-customers-previous-month-and-current-month/m-p/2122489#M48675</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp; Hi, could you share mroe data? the data you've shared above does not have Feb &amp;amp; Apr data hence it is natural to show no value.&amp;nbsp;When your date filter context is Jan, there is no data for last year Dec, and when date filter is March, there is no data for Feb, and so on.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2021 20:39:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-active-customers-previous-month-and-current-month/m-p/2122489#M48675</guid>
      <dc:creator>colacan</dc:creator>
      <dc:date>2021-10-07T20:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: calculate active customers previous month and current month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-active-customers-previous-month-and-current-month/m-p/2122520#M48678</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp; what do you mean by active customers?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you need cumulative distinct count&amp;nbsp; of wins per yr-month&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure2 =
CALCULATE (
    DISTINCTCOUNT ( 'Table'[customer] ),
    FILTER ( ALL ( 'Table'[ date] ), 'Table'[ date] &amp;lt;= MAX ( 'Table'[ date] ) ),
    'Table'[ status] IN { "won" }
)&lt;/LI-CODE&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>Thu, 07 Oct 2021 20:59:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-active-customers-previous-month-and-current-month/m-p/2122520#M48678</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2021-10-07T20:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: calculate active customers previous month and current month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-active-customers-previous-month-and-current-month/m-p/2122548#M48679</link>
      <description>&lt;P&gt;the data is huge I just made a small snippet of it for understanding.&lt;/P&gt;&lt;P&gt;I have data from Jan 2018 to August 2021.&lt;/P&gt;&lt;P&gt;I get accurate active customers for the current month but I don't know how to get active users for the previous month.&lt;/P&gt;&lt;P&gt;my measure for the previous month just doesn't work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2021 21:09:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-active-customers-previous-month-and-current-month/m-p/2122548#M48679</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-10-07T21:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: calculate active customers previous month and current month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-active-customers-previous-month-and-current-month/m-p/2122551#M48680</link>
      <description>&lt;P&gt;yes, I want the cumulative distinct count of active users for the current month and the previous month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2021 21:11:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-active-customers-previous-month-and-current-month/m-p/2122551#M48680</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-10-07T21:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: calculate active customers previous month and current month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-active-customers-previous-month-and-current-month/m-p/2122555#M48681</link>
      <description>&lt;P&gt;Then try the measure i gave&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2021 21:12:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-active-customers-previous-month-and-current-month/m-p/2122555#M48681</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2021-10-07T21:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: calculate active customers previous month and current month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-active-customers-previous-month-and-current-month/m-p/2122559#M48682</link>
      <description>&lt;P&gt;how do I use it for finding previous month's active users&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2021 21:14:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-active-customers-previous-month-and-current-month/m-p/2122559#M48682</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-10-07T21:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: calculate active customers previous month and current month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-active-customers-previous-month-and-current-month/m-p/2122561#M48683</link>
      <description>&lt;P&gt;I have data from Jan 2018 to August 2021, I have just shown the above data as a sample snippet.&lt;/P&gt;&lt;P&gt;need help with previous months active users&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2021 21:16:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-active-customers-previous-month-and-current-month/m-p/2122561#M48683</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-10-07T21:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: calculate active customers previous month and current month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-active-customers-previous-month-and-current-month/m-p/2128711#M48843</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;You can try these measures:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;CurrentMonthCount = 
CALCULATE (
    DISTINCTCOUNT ( 'Table'[Customer] ),
    FILTER (
        'Table',
        YEAR ( 'Table'[Date] ) = YEAR ( SELECTEDVALUE ( 'Date'[Date] ) )
            &amp;amp;&amp;amp; MONTH ( 'Table'[Date] ) = MONTH ( SELECTEDVALUE ( 'Date'[Date] ) )
            &amp;amp;&amp;amp; 'Table'[Status] = "won"
    )
)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;LastMonthCount = 
VAR lastmonth =
    EOMONTH ( SELECTEDVALUE ( 'Date'[Date] ), -2 ) + 1
RETURN
    CALCULATE (
        DISTINCTCOUNT ( 'Table'[Customer] ),
        FILTER (
            'Table',
            YEAR ( 'Table'[Date] ) = YEAR ( lastmonth )
                &amp;amp;&amp;amp; MONTH ( 'Table'[Date] ) = MONTH ( lastmonth )
                &amp;amp;&amp;amp; 'Table'[Status] = "won"
        )
    )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Yingjie Li&lt;BR /&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 05:59:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-active-customers-previous-month-and-current-month/m-p/2128711#M48843</guid>
      <dc:creator>v-yingjl</dc:creator>
      <dc:date>2021-10-12T05:59:58Z</dc:date>
    </item>
    <item>
      <title>Re: calculate active customers previous month and current month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-active-customers-previous-month-and-current-month/m-p/2129533#M48860</link>
      <description>&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 12:10:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-active-customers-previous-month-and-current-month/m-p/2129533#M48860</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-10-12T12:10:41Z</dc:date>
    </item>
  </channel>
</rss>

