<?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 Calculating Retained In Consecutive Months in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Retained-In-Consecutive-Months/m-p/813889#M5329</link>
    <description>&lt;P&gt;&lt;FONT size="2"&gt;Hi.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;I'm trying to calculate the count of players who have deposited in consecutive months (when slicing on any given month).&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;I have a fact table which can have multiple deposits per day containing a [PlayerId] and [DepositDate].&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Some metrics I already have setup here are the &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;[Total Depositors] =&amp;nbsp;DISTINCTCOUNT(Deposits[PlayerId])&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;[First Time Depositors] =&amp;nbsp;CALCULATE(COUNTROWS(Deposits), Deposits[IsFirstDeposit]=1)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;[Retained] =&amp;nbsp;[Depositors]-[FTDs]&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;The requirement for &lt;STRONG&gt;[Consecutive Depositor]&lt;/STRONG&gt; is the count of players that have deposited in &lt;U&gt;consecutive months&lt;/U&gt; (not just any previous month).&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;So I'm guessing it's somewhere along the lines of := SUMX(&amp;nbsp;&lt;EM&gt;Distinct count of PlayerId where depositor in current month and previous month&lt;/EM&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;It's evaluating whether the particular player has deposited in the previous month that is beyond my DAX capabilities. The highlighted column would be the&amp;nbsp;&lt;EM&gt;desired&lt;/EM&gt; output.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Thanks&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Dave&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 09 Oct 2019 16:31:17 GMT</pubDate>
    <dc:creator>djbuncle</dc:creator>
    <dc:date>2019-10-09T16:31:17Z</dc:date>
    <item>
      <title>Calculating Retained In Consecutive Months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Retained-In-Consecutive-Months/m-p/813889#M5329</link>
      <description>&lt;P&gt;&lt;FONT size="2"&gt;Hi.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;I'm trying to calculate the count of players who have deposited in consecutive months (when slicing on any given month).&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;I have a fact table which can have multiple deposits per day containing a [PlayerId] and [DepositDate].&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Some metrics I already have setup here are the &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;[Total Depositors] =&amp;nbsp;DISTINCTCOUNT(Deposits[PlayerId])&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;[First Time Depositors] =&amp;nbsp;CALCULATE(COUNTROWS(Deposits), Deposits[IsFirstDeposit]=1)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;[Retained] =&amp;nbsp;[Depositors]-[FTDs]&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;The requirement for &lt;STRONG&gt;[Consecutive Depositor]&lt;/STRONG&gt; is the count of players that have deposited in &lt;U&gt;consecutive months&lt;/U&gt; (not just any previous month).&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;So I'm guessing it's somewhere along the lines of := SUMX(&amp;nbsp;&lt;EM&gt;Distinct count of PlayerId where depositor in current month and previous month&lt;/EM&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;It's evaluating whether the particular player has deposited in the previous month that is beyond my DAX capabilities. The highlighted column would be the&amp;nbsp;&lt;EM&gt;desired&lt;/EM&gt; output.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Thanks&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Dave&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2019 16:31:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Retained-In-Consecutive-Months/m-p/813889#M5329</guid>
      <dc:creator>djbuncle</dc:creator>
      <dc:date>2019-10-09T16:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Retained In Consecutive Months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Retained-In-Consecutive-Months/m-p/813975#M5334</link>
      <description>&lt;P&gt;Please find the sample below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Continous Months = CALCULATE(DISTINCTCOUNT('Date'[Format Month]),DATESINPERIOD('Date'[Date Filer],STARTOFMONTH(dateadd('Date'[Date Filer],-2,MONTH)),2,MONTH))&lt;/PRE&gt;&lt;P&gt;Based on no of month change -2 (-1*month value)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This number should be equal month value for continuous data.&lt;/P&gt;&lt;P&gt;I have used a formatted month to count of month year. That can be replaced with other options.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @ &lt;/STRONG&gt;&lt;BR /&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2019 18:50:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Retained-In-Consecutive-Months/m-p/813975#M5334</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2019-10-09T18:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Retained In Consecutive Months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Retained-In-Consecutive-Months/m-p/814545#M5353</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp; but this doesn't really address counting the specific players who have deposited in consecutive months. I really need to be using the count of [PlayerId]s who have deposits in consecutive months.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2019 09:33:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Retained-In-Consecutive-Months/m-p/814545#M5353</guid>
      <dc:creator>djbuncle</dc:creator>
      <dc:date>2019-10-10T09:33:48Z</dc:date>
    </item>
  </channel>
</rss>

