<?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: Cumulative Calculation help needed for Churned Customer Rate in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Calculation-help-needed-for-Churned-Customer-Rate/m-p/2483850#M68124</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , refer the formula in these blogs , they can help&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Customer Retention Part 5: LTD Vs Period Retention&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-5-LTD-and-PeriodYoY-Retention-is-only/ba-p/2114497" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-5-LTD-and-PeriodYoY-Retention-is-only/ba-p/2114497&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Customer Retention Part 1:&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/ba-p/1361529" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/ba-p/1361529&lt;/A&gt;&lt;BR /&gt;Customer Retention Part 2: Period over Period Retention :&lt;A href="https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-2-Period-over-Period-Retention/ba-p/1377458" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-2-Period-over-Period-Retention/ba-p/1377458&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Apr 2022 16:08:44 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2022-04-28T16:08:44Z</dc:date>
    <item>
      <title>Cumulative Calculation help needed for Churned Customer Rate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Calculation-help-needed-for-Churned-Customer-Rate/m-p/2483730#M68120</link>
      <description>&lt;P&gt;I am working on creating Customer Churn Rate Measure using the below logic:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example: we want to compute Churn Rate in the Month of March, 2022.&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Churn Calculation:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;- There are 10,000 Users&amp;nbsp; who have purchased at least once in last one year (i.e. from Apr 2021 - Mar 2022) – this becomes the ‘User Base’.&lt;BR /&gt;- Within the 'User Base', if there are 4,200 users who have placed an order in last 125 days.&lt;BR /&gt;- To calculate Churned Users, i.e. users who have not purchased in last 125 days, will be: 10,000 - 4,200 = 5,800. This is the Churned Users count.&lt;BR /&gt;- Then Churn Rate is calculated as: (Churned Users/Base of users)% i.e. 5800/10000 = 58%&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have Fiscal Year and Fiscal Month Slicer in the report:&lt;BR /&gt;Fiscal Year : 1 Oct 2021 - 30 Sep 2022&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Logic I created&lt;BR /&gt;&lt;U&gt;&lt;STRONG&gt;For User Base:&amp;nbsp;&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;First Date:&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;FIRSTDATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DATESINPERIOD&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Orders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RONG&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;[User Base]&lt;/SPAN&gt;&lt;SPAN&gt; - &lt;/SPAN&gt;&lt;SPAN&gt;[Bought in 125 Days]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;STRONG&gt;Churn_rate&lt;/STRONG&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;DIVIDE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Churned Users]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;[User Base]&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 am getting the results right on selecting one Fiscal Month for eg March 2022&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;But if I am selecting more than 1 month in slicer, it is returning the total as latest month data and not the Average of months selected. Please see the below screenshot:&lt;/P&gt;&lt;img /&gt;&lt;P&gt;I need the calculation to show total as shown in the below screenshot. Can someone help me here to calculate Cumulative Average?&lt;/P&gt;&lt;img /&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 28 Apr 2022 15:15:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Calculation-help-needed-for-Churned-Customer-Rate/m-p/2483730#M68120</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-28T15:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Calculation help needed for Churned Customer Rate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Calculation-help-needed-for-Churned-Customer-Rate/m-p/2483850#M68124</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , refer the formula in these blogs , they can help&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Customer Retention Part 5: LTD Vs Period Retention&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-5-LTD-and-PeriodYoY-Retention-is-only/ba-p/2114497" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-5-LTD-and-PeriodYoY-Retention-is-only/ba-p/2114497&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Customer Retention Part 1:&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/ba-p/1361529" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/ba-p/1361529&lt;/A&gt;&lt;BR /&gt;Customer Retention Part 2: Period over Period Retention :&lt;A href="https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-2-Period-over-Period-Retention/ba-p/1377458" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-2-Period-over-Period-Retention/ba-p/1377458&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 16:08:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Calculation-help-needed-for-Churned-Customer-Rate/m-p/2483850#M68124</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-04-28T16:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Calculation help needed for Churned Customer Rate</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Calculation-help-needed-for-Churned-Customer-Rate/m-p/2490138#M68527</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try the following measures:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;First Date = 
IF (
    HASONEVALUE ( Orders[Month] ),
    FIRSTDATE (
        DATESINPERIOD ( Orders[order_date], FIRSTDATE ( Orders[order_date] ), -1, YEAR )
    )
)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Last Date = 
IF (
    HASONEVALUE ( Orders[Month] ),
    LASTDATE (
        DATESINPERIOD ( Orders[order_date], LASTDATE ( Orders[order_date] ), -1, YEAR )
    )
)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Firstdate_125 = 
IF (
    HASONEVALUE ( Orders[Month] ),
    FIRSTDATE (
        DATESINPERIOD ( Orders[order_date], MAX ( Orders[order_date] ), -126, DAY )
    )
)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;User Base = 
AVERAGEX (
    VALUES ( Orders[Month] ),
    CALCULATE (
        DISTINCTCOUNT ( Orders[Users] ),
        DATESBETWEEN ( 'Date'[Fiscal Date], [First Date], [Last Date] ),
        ALL ( Orders )
    )
)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Bought in 125 Days = 
AVERAGEX (
    VALUES ( Orders[Month] ),
    CALCULATE (
        DISTINCTCOUNT ( Orders[Users] ),
        DATESBETWEEN ( 'Date'[Fiscal Date], [Firstdate_125], [Lastdate_125] ),
        ALL ( Orders )
    )
)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Churned Users = [User Base] - [Bought in 125 Days]&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Churn_rate = 
AVERAGEX ( VALUES ( Orders[Month] ), DIVIDE ( [Churned Users], [User Base] ) )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.&lt;BR /&gt;Best Regards,&lt;BR /&gt;Winniz&lt;BR /&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 06:55:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cumulative-Calculation-help-needed-for-Churned-Customer-Rate/m-p/2490138#M68527</guid>
      <dc:creator>v-kkf-msft</dc:creator>
      <dc:date>2022-05-03T06:55:20Z</dc:date>
    </item>
  </channel>
</rss>

