<?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: Monthly Customer Retention Rates in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Monthly-Customer-Retention-Rates/m-p/2133501#M92122</link>
    <description>&lt;P&gt;I started working on this.&amp;nbsp; It's not difficult, it's just a lot of flags and isn't really easy to explain in a forum.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- First, you have to have a Master Calendar where you flag your "date is greater than the 1st of the month" dates.&lt;/P&gt;
&lt;P&gt;- Then, you have to break apart your User-Registration table into a table that only has Registrations as that is an activity we want to pick out&lt;/P&gt;
&lt;P&gt;- Combine Costs and Payments to this Registrations table.&lt;/P&gt;
&lt;P&gt;-Create a table that joins your Fact table (Registrations, Payments, Costs) to the MasterCal.&lt;/P&gt;
&lt;P&gt;-Copy your event dates (registration date, payment date...and add 30 days to align them to the "Start of activity period" requirement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is something I started on.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[Users-Registration]:
Load * Inline
[
ID,	NAME,	BALANCE, REGISTERED
1,	John Doe,	10,	2022-11-15 06:38:36
2,	Mike Smith,	15,	2022-12-16 07:42:12
]
;

[Payments]:
Load * Inline
[
ID,	USER_ID,	AMOUNT,	CREATED_AT
1,	2,	20,	2022-12-17 02:42:12
2,	1,	10,	2022-12-18 02:42:12
]
;

[Costs]:
Load * Inline
[
ID,	USER_ID,	COST,	CREATED_AT
1,	2,	4,	2022-12-18 03:42:12
2,	1,	7,	2022-12-19 03:42:12
]
;

/*
*	Break out the users table into a single table
*
*/
[Users]:
Load ID As 'User Id',
ID As '%_user_id',
NAME
Resident [Users-Registration]
;

/*
*	Create a Fact Table with cleaned up dates from the timestamps
*
*/
[Fact Table]:
Load ID As '%_user_id',
BALANCE,
'Y' As 'Is Registration',
Date(Floor(TimeStamp#(REGISTERED, 'YYYY-MM-DD h:mm:ss')), 'YYYY-MM-DD')  As 'Fact Date'
Resident [Users-Registration]
;

Concatenate([Fact Table])
Load ID As 'Payment Id',
ID As '%_user_id',
AMOUNT,
'Y' As 'Is Payment',
Date(Floor(TimeStamp#(CREATED_AT, 'YYYY-MM-DD h:mm:ss')), 'YYYY-MM-DD')  As 'Fact Date'
Resident [Payments]
;

Concatenate([Fact Table])
Load ID As 'Cost Id',
ID As '%_user_id',
COST,
'Y' As 'Is Costs',
Date(Floor(TimeStamp#(CREATED_AT, 'YYYY-MM-DD h:mm:ss')), 'YYYY-MM-DD')  As 'Fact Date'
Resident [Costs]
;

/*
*	Create a unique id for each row of the Fact Table
*
*/
[Fact Table 2]:
Load [Fact Id] As '%_fact_id',
*
;
Load RecNo() As 'Fact Id',
*
Resident [Fact Table]
;

Drop Table [Fact Table]
;

Rename Table [Fact Table 2] To [Fact Table]
;

/*
*	Create the calendar join table
*   flag our dates, and add 30 days so that they
*   will be pushed to the 'Start of activity period'
*
*/
[Fact Calendar Join]:
Load %_fact_id,
DayStart(Floor(Num([Fact Date]))) AS '%fact_calendar_key',
'Y' As 'Standard Activity Period',
'N' As 'Start of Next Activity Period'
Resident [Fact Table]
;
Load %_fact_id,
DayStart(Floor(Num([Fact Date])))+30 AS '%fact_calendar_key',
'N' As 'Standard Activity Period',
'Y' As 'Start of Next Activity Period'
Resident [Fact Table]
;

/*
*	Create a master calendar
*   flagging days &amp;gt; 1 so we can use a flag for the 'S'
*   in the CRR equation
*/
MasterCalendar: 
LEFT KEEP([Fact Table])
LOAD 
 DayStart(Floor(Num(TempDate))) AS %fact_calendar_key, 
 If(Day( (TempDate) ) &amp;gt; 1, 'Y', 'N' ) As 'Start of Next Activity Period',
 Date(DayStart(TempDate)) AS CalDate, 
 Dual(Month(TempDate) &amp;amp;' ' &amp;amp; Year(TempDate), MonthStart(TempDate)) As MonthYear
;

//=== Generate a temp table of dates === 
LOAD 
 DATE(mindate + IterNo()) AS TempDate,
 mindate,
 maxdate // Used in InYearToDate() above, but not kept 
WHILE mindate + IterNo() &amp;lt;= maxdate;

//=== Get min/max dates from Field ===/
LOAD
 MIN(FieldValue('%fact_calendar_key', recno()))-1 as mindate,
 MAX(FieldValue('%fact_calendar_key', recno())) as maxdate
AUTOGENERATE FieldValueCount('%fact_calendar_key');

Drop Tables [Users-Registration], [Payments], [Costs]
;

Exit Script
;&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 31 Oct 2023 19:08:12 GMT</pubDate>
    <dc:creator>JustinDallas</dc:creator>
    <dc:date>2023-10-31T19:08:12Z</dc:date>
    <item>
      <title>Monthly Customer Retention Rates</title>
      <link>https://community.qlik.com/t5/App-Development/Monthly-Customer-Retention-Rates/m-p/2133479#M92118</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Our database has the following 3 tables (the data listed in the tables is only an example):&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;users&lt;/STRONG&gt;:&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;&lt;STRONG&gt;ID&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="16.666666666666668%" height="25px"&gt;&lt;STRONG&gt;NAME&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="16.666666666666668%"&gt;&lt;STRONG&gt;BALANCE&lt;BR /&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;&lt;STRONG&gt;REGISTERED &lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;1&lt;/TD&gt;
&lt;TD width="16.666666666666668%" height="25px"&gt;John Doe&lt;/TD&gt;
&lt;TD width="16.666666666666668%"&gt;10&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;2022-11-15 06:38:36&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;2&lt;/TD&gt;
&lt;TD width="16.666666666666668%" height="25px"&gt;Mike Smith&lt;/TD&gt;
&lt;TD width="16.666666666666668%"&gt;15&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;2022-12-16 07:42:12&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;payments&lt;/STRONG&gt;: shows the payments made by users:&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="25%"&gt;&lt;STRONG&gt;ID&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="25%"&gt;&lt;STRONG&gt;USER_ID&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="25%"&gt;&lt;STRONG&gt;AMOUNT&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="25%"&gt;&lt;STRONG&gt;CREATED_AT&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%"&gt;1&lt;/TD&gt;
&lt;TD width="25%"&gt;2&lt;/TD&gt;
&lt;TD width="25%"&gt;20&lt;/TD&gt;
&lt;TD width="25%"&gt;2022-12-17 02:42:12&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%"&gt;2&lt;/TD&gt;
&lt;TD width="25%"&gt;1&lt;/TD&gt;
&lt;TD width="25%"&gt;10&lt;/TD&gt;
&lt;TD width="25%"&gt;2022-12-18 02:42:12&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;costs&lt;/STRONG&gt;: shows the costs of the users:&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="25%"&gt;&lt;STRONG&gt;ID&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="25%"&gt;&lt;STRONG&gt;USER_ID&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="25%"&gt;&lt;STRONG&gt;COST&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="25%"&gt;&lt;STRONG&gt;CREATED_AT&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%"&gt;1&lt;/TD&gt;
&lt;TD width="25%"&gt;2&lt;/TD&gt;
&lt;TD width="25%"&gt;4&lt;/TD&gt;
&lt;TD width="25%"&gt;2022-12-18 03:42:12&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%"&gt;2&lt;/TD&gt;
&lt;TD width="25%"&gt;1&lt;/TD&gt;
&lt;TD width="25%"&gt;7&lt;/TD&gt;
&lt;TD width="25%"&gt;2022-12-19 03:42:12&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;We have the same 3 tables in our Qlik application (in our Data Model)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;.&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;For each month we want to show&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;STRONG&gt;Customer Retention Rate (CRR)&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;Formula for CRR is:&lt;/P&gt;
&lt;PRE class="c-mrkdwn__pre" data-stringify-type="pre"&gt;Customer Retention Rate formula = [(E-N)/S] x 100

    S = Number of active users at the start of the time period 
    E = Number of active users at the end of the time period
    N = Number of active users registered within the time period&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;where &lt;STRONG&gt;active users&lt;/STRONG&gt; are those who have had a balance change during the time period. For example, for &lt;STRONG&gt;May 2023:&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;S = Number of users that have either made payments or made costs from 2nd of April to 1st of May.&lt;/LI&gt;
&lt;LI&gt;E = Number of users that have either made payments or made costs from 1st of May to 31 May.&lt;/LI&gt;
&lt;LI&gt;N = Number of users that have either made payments or made costs from 1st of May to 31 May, that registered during May.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;We tried to create an app/&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;sheet/visualization that would display the information described above, but without success.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;The &lt;STRONG&gt;dimension&lt;/STRONG&gt; would be Year-Month (which we could somehow extract, maybe even from the Data load editor.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;But the &lt;STRONG&gt;measure&lt;/STRONG&gt; is the problem, it would probably be some very complicated expression. Do you have any ideas or suggestions on how we could solve this, or perhaps what the final expression used as a measure would look like?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 18:03:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Monthly-Customer-Retention-Rates/m-p/2133479#M92118</guid>
      <dc:creator>RoyBatty</dc:creator>
      <dc:date>2023-10-31T18:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: Monthly Customer Retention Rates</title>
      <link>https://community.qlik.com/t5/App-Development/Monthly-Customer-Retention-Rates/m-p/2133501#M92122</link>
      <description>&lt;P&gt;I started working on this.&amp;nbsp; It's not difficult, it's just a lot of flags and isn't really easy to explain in a forum.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- First, you have to have a Master Calendar where you flag your "date is greater than the 1st of the month" dates.&lt;/P&gt;
&lt;P&gt;- Then, you have to break apart your User-Registration table into a table that only has Registrations as that is an activity we want to pick out&lt;/P&gt;
&lt;P&gt;- Combine Costs and Payments to this Registrations table.&lt;/P&gt;
&lt;P&gt;-Create a table that joins your Fact table (Registrations, Payments, Costs) to the MasterCal.&lt;/P&gt;
&lt;P&gt;-Copy your event dates (registration date, payment date...and add 30 days to align them to the "Start of activity period" requirement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is something I started on.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[Users-Registration]:
Load * Inline
[
ID,	NAME,	BALANCE, REGISTERED
1,	John Doe,	10,	2022-11-15 06:38:36
2,	Mike Smith,	15,	2022-12-16 07:42:12
]
;

[Payments]:
Load * Inline
[
ID,	USER_ID,	AMOUNT,	CREATED_AT
1,	2,	20,	2022-12-17 02:42:12
2,	1,	10,	2022-12-18 02:42:12
]
;

[Costs]:
Load * Inline
[
ID,	USER_ID,	COST,	CREATED_AT
1,	2,	4,	2022-12-18 03:42:12
2,	1,	7,	2022-12-19 03:42:12
]
;

/*
*	Break out the users table into a single table
*
*/
[Users]:
Load ID As 'User Id',
ID As '%_user_id',
NAME
Resident [Users-Registration]
;

/*
*	Create a Fact Table with cleaned up dates from the timestamps
*
*/
[Fact Table]:
Load ID As '%_user_id',
BALANCE,
'Y' As 'Is Registration',
Date(Floor(TimeStamp#(REGISTERED, 'YYYY-MM-DD h:mm:ss')), 'YYYY-MM-DD')  As 'Fact Date'
Resident [Users-Registration]
;

Concatenate([Fact Table])
Load ID As 'Payment Id',
ID As '%_user_id',
AMOUNT,
'Y' As 'Is Payment',
Date(Floor(TimeStamp#(CREATED_AT, 'YYYY-MM-DD h:mm:ss')), 'YYYY-MM-DD')  As 'Fact Date'
Resident [Payments]
;

Concatenate([Fact Table])
Load ID As 'Cost Id',
ID As '%_user_id',
COST,
'Y' As 'Is Costs',
Date(Floor(TimeStamp#(CREATED_AT, 'YYYY-MM-DD h:mm:ss')), 'YYYY-MM-DD')  As 'Fact Date'
Resident [Costs]
;

/*
*	Create a unique id for each row of the Fact Table
*
*/
[Fact Table 2]:
Load [Fact Id] As '%_fact_id',
*
;
Load RecNo() As 'Fact Id',
*
Resident [Fact Table]
;

Drop Table [Fact Table]
;

Rename Table [Fact Table 2] To [Fact Table]
;

/*
*	Create the calendar join table
*   flag our dates, and add 30 days so that they
*   will be pushed to the 'Start of activity period'
*
*/
[Fact Calendar Join]:
Load %_fact_id,
DayStart(Floor(Num([Fact Date]))) AS '%fact_calendar_key',
'Y' As 'Standard Activity Period',
'N' As 'Start of Next Activity Period'
Resident [Fact Table]
;
Load %_fact_id,
DayStart(Floor(Num([Fact Date])))+30 AS '%fact_calendar_key',
'N' As 'Standard Activity Period',
'Y' As 'Start of Next Activity Period'
Resident [Fact Table]
;

/*
*	Create a master calendar
*   flagging days &amp;gt; 1 so we can use a flag for the 'S'
*   in the CRR equation
*/
MasterCalendar: 
LEFT KEEP([Fact Table])
LOAD 
 DayStart(Floor(Num(TempDate))) AS %fact_calendar_key, 
 If(Day( (TempDate) ) &amp;gt; 1, 'Y', 'N' ) As 'Start of Next Activity Period',
 Date(DayStart(TempDate)) AS CalDate, 
 Dual(Month(TempDate) &amp;amp;' ' &amp;amp; Year(TempDate), MonthStart(TempDate)) As MonthYear
;

//=== Generate a temp table of dates === 
LOAD 
 DATE(mindate + IterNo()) AS TempDate,
 mindate,
 maxdate // Used in InYearToDate() above, but not kept 
WHILE mindate + IterNo() &amp;lt;= maxdate;

//=== Get min/max dates from Field ===/
LOAD
 MIN(FieldValue('%fact_calendar_key', recno()))-1 as mindate,
 MAX(FieldValue('%fact_calendar_key', recno())) as maxdate
AUTOGENERATE FieldValueCount('%fact_calendar_key');

Drop Tables [Users-Registration], [Payments], [Costs]
;

Exit Script
;&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 31 Oct 2023 19:08:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Monthly-Customer-Retention-Rates/m-p/2133501#M92122</guid>
      <dc:creator>JustinDallas</dc:creator>
      <dc:date>2023-10-31T19:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: Monthly Customer Retention Rates</title>
      <link>https://community.qlik.com/t5/App-Development/Monthly-Customer-Retention-Rates/m-p/2133858#M92148</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/42707"&gt;@JustinDallas&lt;/a&gt; !&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2023 19:15:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Monthly-Customer-Retention-Rates/m-p/2133858#M92148</guid>
      <dc:creator>RoyBatty</dc:creator>
      <dc:date>2023-11-01T19:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: Monthly Customer Retention Rates</title>
      <link>https://community.qlik.com/t5/App-Development/Monthly-Customer-Retention-Rates/m-p/2133901#M92150</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/42707"&gt;@JustinDallas&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;I have a few questions:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;1. In [Users] table there are these two columns:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;```&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;ID As 'User Id',&lt;BR /&gt;ID As '%_user_id',&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;```&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;Why do we also have "&lt;STRONG&gt;%_user_id&lt;/STRONG&gt;", why don't we just have "&lt;STRONG&gt;User Id&lt;/STRONG&gt;" and use that everywhere instead of "&lt;STRONG&gt;%_user_id&lt;/STRONG&gt;"?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;(I'm not sure what "%" prefix does, I googled and found that it's supposed to hide that column from the end users of the APP?)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;2. This is the Model View that we got at the end:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RoyBatty_0-1698877422434.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/119206iA97940695BB8BE74/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RoyBatty_0-1698877422434.png" alt="RoyBatty_0-1698877422434.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;Is that how you thought it should turn out in the end? (please note that there are some small differences in the names of the columns, here, for the sake of simplicity, I presented that we have a "costs" table, but instead we have a "messages" table, which is essentially the same thing...)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;If yes, I understand that "&lt;STRONG&gt;Fact Table&lt;/STRONG&gt;" is basically a table of all activities that affected (changed) users balance (payments and costs). &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;Then I see that there's "&lt;STRONG&gt;MasterCalendar&lt;/STRONG&gt;" table - I guess we created it in order to be able to easily calculate/determine which "activities" (from "Fact Table") belong to the specified month: &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RoyBatty_1-1698877776386.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/119207i5C325F63E8C799E7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RoyBatty_1-1698877776386.png" alt="RoyBatty_1-1698877776386.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;My guess is that the whole purpose of this table is to use "&lt;STRONG&gt;MonthYear&lt;/STRONG&gt;" as a &lt;STRONG&gt;dimension&lt;/STRONG&gt; on visualizations.&lt;/P&gt;
&lt;P&gt;What I don't understand is this "&lt;STRONG&gt;Fact Calendar Join&lt;/STRONG&gt;" table. It looks like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RoyBatty_2-1698877947009.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/119208iA7505C0C50B788E3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RoyBatty_2-1698877947009.png" alt="RoyBatty_2-1698877947009.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;Should we use it somehow when creating visualizations for getting monthly CRRs using this formula (copied here just to be easier to find it):&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE class="c-mrkdwn__pre" data-stringify-type="pre"&gt;Customer Retention Rate formula = [(E-N)/S] x 100

    S = Number of active users at the start of the time period 
    E = Number of active users at the end of the time period
    N = Number of active users registered within the time period&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN class="HwtZe"&gt;&lt;SPAN class="jCAhz ChMk0b"&gt;&lt;SPAN class="ryNqvb"&gt;where &lt;STRONG&gt;active users&lt;/STRONG&gt; are those who have had a balance change during the time period. For example, for &lt;STRONG&gt;May 2023:&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;S = Number of users that have either made payments or made costs from 2nd of April to 1st of May.&lt;/LI&gt;
&lt;LI&gt;E = Number of users that have either made payments or made costs from 1st of May to 31 May.&lt;/LI&gt;
&lt;LI&gt;N = Number of users that have either made payments or made costs from 1st of May to 31 May, that registered during May.&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 01 Nov 2023 22:43:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Monthly-Customer-Retention-Rates/m-p/2133901#M92150</guid>
      <dc:creator>RoyBatty</dc:creator>
      <dc:date>2023-11-01T22:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Monthly Customer Retention Rates</title>
      <link>https://community.qlik.com/t5/App-Development/Monthly-Customer-Retention-Rates/m-p/2134310#M92187</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;SPAN&gt;Why do we also have "&lt;/SPAN&gt;&lt;STRONG&gt;%_user_id&lt;/STRONG&gt;&lt;SPAN&gt;", why don't we just have "&lt;/SPAN&gt;&lt;STRONG&gt;User Id&lt;/STRONG&gt;&lt;SPAN&gt;" and use that everywhere instead of "&lt;/SPAN&gt;&lt;STRONG&gt;%_user_id&lt;/STRONG&gt;&lt;SPAN&gt;"?&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;I have a strict design policy that key fields are always prefixed with %_ and only connect to two tables.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;SPAN&gt;Is that how you thought it should turn out in the end?&lt;/SPAN&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;No, the "Start of Activity" shouldn't exist on the Master Calendar table.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;SPAN&gt;Should we use it somehow when creating visualizations for getting monthly CRRs using this formula (copied here just to be easier to find it):&lt;/SPAN&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;Yes, in something like Count, you will have &lt;EM&gt;Count({&amp;lt;[Start of Previous Activity]={'N'}&amp;gt;}) [User Id])&lt;/EM&gt; to differentiate between the Fact Calendar Join types.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 04:14:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Monthly-Customer-Retention-Rates/m-p/2134310#M92187</guid>
      <dc:creator>JustinDallas</dc:creator>
      <dc:date>2023-11-03T04:14:46Z</dc:date>
    </item>
  </channel>
</rss>

