<?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 Sort AGGR to find Purchase Frequency in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sort-AGGR-to-find-Purchase-Frequency/m-p/984314#M335892</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to find a way to calculate the frequency of payment about the selections that have been made.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a Fact table with invoices for many customers and my goal is to find this:&lt;/P&gt;&lt;P&gt;Client A - Buys every 5 days.&lt;/P&gt;&lt;P&gt;Client B - Buys every 10 days.&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been trying with the Aggr() but i'm not being able to sort the table so that the invoice dates make sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anybody deal with this? In the attach is what i want to do but removing the ID_Date from the table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Oct 2015 22:00:03 GMT</pubDate>
    <dc:creator>lfogoncalves</dc:creator>
    <dc:date>2015-10-28T22:00:03Z</dc:date>
    <item>
      <title>Sort AGGR to find Purchase Frequency</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-AGGR-to-find-Purchase-Frequency/m-p/984314#M335892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to find a way to calculate the frequency of payment about the selections that have been made.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a Fact table with invoices for many customers and my goal is to find this:&lt;/P&gt;&lt;P&gt;Client A - Buys every 5 days.&lt;/P&gt;&lt;P&gt;Client B - Buys every 10 days.&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been trying with the Aggr() but i'm not being able to sort the table so that the invoice dates make sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anybody deal with this? In the attach is what i want to do but removing the ID_Date from the table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2015 22:00:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-AGGR-to-find-Purchase-Frequency/m-p/984314#M335892</guid>
      <dc:creator>lfogoncalves</dc:creator>
      <dc:date>2015-10-28T22:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: Sort AGGR to find Purchase Frequency</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-AGGR-to-find-Purchase-Frequency/m-p/984315#M335893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try a straight table with dimension Store Code and a single expression&lt;/P&gt;&lt;P&gt;=(Max(Id_Date)-Min(Id_Date))/ count(DISTINCT Id_Date)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2015 22:21:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-AGGR-to-find-Purchase-Frequency/m-p/984315#M335893</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-10-28T22:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: Sort AGGR to find Purchase Frequency</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-AGGR-to-find-Purchase-Frequency/m-p/984316#M335894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It worked. I was thinking the &lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;avg&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;avg&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Id_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)-&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;above&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;avg&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Id_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Store Code]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Id_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt; approach but it was forcing me to sort the table. It can be a table with hundreds of millions of rows so i think your approach is the best.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2015 22:24:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-AGGR-to-find-Purchase-Frequency/m-p/984316#M335894</guid>
      <dc:creator>lfogoncalves</dc:creator>
      <dc:date>2015-10-28T22:24:07Z</dc:date>
    </item>
  </channel>
</rss>

