<?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 Repetitive customer in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Repetitive-customer/m-p/326001#M120047</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clarify on how you are calculating the Difference &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Custid1 = 10 - 8 = 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Custid2&amp;nbsp; = 11 - (7-1) = 5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So how will you calculate the difference&amp;nbsp; when there is a customer who made purchase on 4 days&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Dec 2011 03:24:06 GMT</pubDate>
    <dc:creator>qliksus</dc:creator>
    <dc:date>2011-12-28T03:24:06Z</dc:date>
    <item>
      <title>Repetitive customer</title>
      <link>https://community.qlik.com/t5/QlikView/Repetitive-customer/m-p/325999#M120045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Selecting a date, I need to know for a year back the average of the amount paid by my customers in a purchase and the average of the difference in days between these purchases.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;customer_id= 1 ; 2 purchases (day 10 amount= 20, day 8 amount= 30)&lt;/P&gt;&lt;P&gt;customer_id= 2 ; 3 purchases (day 11 amount= 30, day 7 amount= 40, day 1 amount 50)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;customer_id1: avg(amount)= 25 avg(difference) = 2&lt;/P&gt;&lt;P&gt;customer_id2: avg(amount)= 40 avg(difference) = 5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need the to show only the total:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;avg(amount_paid/difference)= ((25+40)/2) / ((2+5)/2)= 32,5 / 3,5= 9,28&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is that possible???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Dec 2011 22:15:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Repetitive-customer/m-p/325999#M120045</guid>
      <dc:creator />
      <dc:date>2011-12-27T22:15:12Z</dc:date>
    </item>
    <item>
      <title>Repetitive customer</title>
      <link>https://community.qlik.com/t5/QlikView/Repetitive-customer/m-p/326000#M120046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;It's possible, but you'll have to create a new field in your script.&amp;nbsp; You'll first need to order the fact table by date and then customer.&amp;nbsp; Then you can load it using inter-row functions like previous() or peek() to keep track of how many days passed since the last purchase.&amp;nbsp; The first row of each customer would be have an 'empty' difference and then for each future purchase you would subtract the previous row's purchase date from the current row's purchase date.&amp;nbsp; That will give you the average days between purchases and the rest of the formula should be easier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;There might be a fancier way to do it, but that should get the job done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;Karl&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Dec 2011 22:53:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Repetitive-customer/m-p/326000#M120046</guid>
      <dc:creator>pover</dc:creator>
      <dc:date>2011-12-27T22:53:41Z</dc:date>
    </item>
    <item>
      <title>Repetitive customer</title>
      <link>https://community.qlik.com/t5/QlikView/Repetitive-customer/m-p/326001#M120047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clarify on how you are calculating the Difference &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Custid1 = 10 - 8 = 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Custid2&amp;nbsp; = 11 - (7-1) = 5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So how will you calculate the difference&amp;nbsp; when there is a customer who made purchase on 4 days&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2011 03:24:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Repetitive-customer/m-p/326001#M120047</guid>
      <dc:creator>qliksus</dc:creator>
      <dc:date>2011-12-28T03:24:06Z</dc:date>
    </item>
    <item>
      <title>Repetitive customer</title>
      <link>https://community.qlik.com/t5/QlikView/Repetitive-customer/m-p/326002#M120048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the formula is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Custid1 = (10 - &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; / 1 = 2&lt;/P&gt;&lt;P&gt;For Custid2 = ( (7-1) + (11-7) ) / 2 = 5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Karl&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2011 18:07:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Repetitive-customer/m-p/326002#M120048</guid>
      <dc:creator>pover</dc:creator>
      <dc:date>2011-12-28T18:07:54Z</dc:date>
    </item>
    <item>
      <title>Repetitive customer</title>
      <link>https://community.qlik.com/t5/QlikView/Repetitive-customer/m-p/326003#M120049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi david &lt;/P&gt;&lt;P&gt;rest of all thing is ok for me&lt;/P&gt;&lt;P&gt;but i am not able to understand to calculate diffrence formula&lt;/P&gt;&lt;P&gt;and suppose puchase&amp;nbsp; is more than 3 then how will you calculate the diffrence&lt;/P&gt;&lt;P&gt;please let me know&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;rohit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Dec 2011 06:03:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Repetitive-customer/m-p/326003#M120049</guid>
      <dc:creator>rohit214</dc:creator>
      <dc:date>2011-12-29T06:03:29Z</dc:date>
    </item>
    <item>
      <title>Repetitive customer</title>
      <link>https://community.qlik.com/t5/QlikView/Repetitive-customer/m-p/326004#M120050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is the average, as karl said: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Custid2 = ( (7-1) + (11-7) ) / 2 = 5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if there were another purchase from custid2 the difference fórmula would be,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;custid2 = ( (7-1) + (11-7) + ( 13-11)) / 3 = 4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it's OK, I 'll follow karl's advice,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Dec 2011 07:28:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Repetitive-customer/m-p/326004#M120050</guid>
      <dc:creator />
      <dc:date>2011-12-29T07:28:14Z</dc:date>
    </item>
  </channel>
</rss>

