<?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: Repeat Callers in 3 days &amp;amp; 7 days in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Repeat-Callers-in-3-days-amp-7-days/m-p/2116531#M91113</link>
    <description>&lt;P&gt;try this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;data:
load * inline [
customer, callDate
A, 1/1/2023
A, 1/3/2023
A, 1/4/2023
A, 1/5/2023
A, 1/9/2023
B, 2/1/2023
B, 2/7/2023
B, 2/9/2023
];


NoConcatenate
tmp:
load distinct * Resident data;

inner join (tmp)
load customer, callDate as repeatCallDate
Resident tmp;

NoConcatenate
repeatCalls:
load * 
Resident tmp
where repeatCallDate &amp;gt; callDate
and repeatCallDate &amp;lt;= callDate+3;

NoConcatenate
hasRepeatCalls:
load distinct customer, callDate, 'yes' as hasrepeatCalls Resident repeatCalls;

left join (data)
load * Resident hasRepeatCalls;

drop table tmp, repeatCalls, hasRepeatCalls;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;repeatCalls table holds all repeat dates that qualify as repeat calls.&amp;nbsp; you can expand on this to implement the totals by just aggregating it.&amp;nbsp; from the sample data:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="edwin_0-1694611680066.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/116212i51C5259DB79F54FC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="edwin_0-1694611680066.png" alt="edwin_0-1694611680066.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Sep 2023 13:28:08 GMT</pubDate>
    <dc:creator>edwin</dc:creator>
    <dc:date>2023-09-13T13:28:08Z</dc:date>
    <item>
      <title>Repeat Callers in 3 days &amp; 7 days</title>
      <link>https://community.qlik.com/t5/App-Development/Repeat-Callers-in-3-days-amp-7-days/m-p/2115450#M91026</link>
      <description>&lt;P&gt;Hi ,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to calculate the repeat callers who have called within 3 days of their first call as shown below.&lt;/P&gt;
&lt;P&gt;A person will be considered for that date if he calls on that particular date only.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="A_M_0-1694428094212.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/116018iCCB8A412FC0E3D12/image-size/medium?v=v2&amp;amp;px=400" role="button" title="A_M_0-1694428094212.png" alt="A_M_0-1694428094212.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Similiarly for 7 days.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 10:32:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Repeat-Callers-in-3-days-amp-7-days/m-p/2115450#M91026</guid>
      <dc:creator>A_M</dc:creator>
      <dc:date>2023-09-11T10:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: Repeat Callers in 3 days &amp; 7 days</title>
      <link>https://community.qlik.com/t5/App-Development/Repeat-Callers-in-3-days-amp-7-days/m-p/2116531#M91113</link>
      <description>&lt;P&gt;try this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;data:
load * inline [
customer, callDate
A, 1/1/2023
A, 1/3/2023
A, 1/4/2023
A, 1/5/2023
A, 1/9/2023
B, 2/1/2023
B, 2/7/2023
B, 2/9/2023
];


NoConcatenate
tmp:
load distinct * Resident data;

inner join (tmp)
load customer, callDate as repeatCallDate
Resident tmp;

NoConcatenate
repeatCalls:
load * 
Resident tmp
where repeatCallDate &amp;gt; callDate
and repeatCallDate &amp;lt;= callDate+3;

NoConcatenate
hasRepeatCalls:
load distinct customer, callDate, 'yes' as hasrepeatCalls Resident repeatCalls;

left join (data)
load * Resident hasRepeatCalls;

drop table tmp, repeatCalls, hasRepeatCalls;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;repeatCalls table holds all repeat dates that qualify as repeat calls.&amp;nbsp; you can expand on this to implement the totals by just aggregating it.&amp;nbsp; from the sample data:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="edwin_0-1694611680066.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/116212i51C5259DB79F54FC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="edwin_0-1694611680066.png" alt="edwin_0-1694611680066.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 13:28:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Repeat-Callers-in-3-days-amp-7-days/m-p/2116531#M91113</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2023-09-13T13:28:08Z</dc:date>
    </item>
  </channel>
</rss>

