<?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 Decile analysis combined with another dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Decile-analysis-combined-with-another-dimension/m-p/218599#M71686</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hello. I will like to ask how do i replace "aggr", if i want to perform decile analysis in the "load script" instead? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Oct 2011 07:25:37 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-10-25T07:25:37Z</dc:date>
    <item>
      <title>Decile analysis combined with another dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Decile-analysis-combined-with-another-dimension/m-p/218592#M71679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a table of purchases by week and customer, similar to this one (wiht many more rows [:)]) :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;WeekNo&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;Cust_id&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;Amount&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;4514&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;101,2&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;654&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;25,63&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;4514&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;45,7,&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;2&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;4514&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;50&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;2&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;654&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;105&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;2&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;4514&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="205"&gt;&lt;P&gt;123&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I would like to perform a decile analysis &lt;I&gt;per week.&lt;/I&gt; In this analysis, deciles should be calculated independently for each week. For each week I want to find out how many customers, ranked the week purchase amount, are in the 80% first buyers, 16% next or 4% left.&lt;/P&gt;&lt;P&gt;Here is what I've done so far :&lt;/P&gt;&lt;P&gt;- First dimension : "WeekNo"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Second dimension :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= if(AGGR(SUM(amount),cust_id, WeekNo)&lt;/P&gt;&lt;P&gt;&amp;lt;= Fractile(TOTAL AGGR(SUM(amount), cust_id, WeekNo), 0.8), '80%',&lt;/P&gt;&lt;P&gt;if(AGGR(SUM(amount), cust_id, WeekNo)&lt;/P&gt;&lt;P&gt;&amp;lt;= Fractile(TOTAL AGGR(SUM(amount), cust_id, WeekNo), 0.96), '16%',&lt;/P&gt;&lt;P&gt;'4%'))&lt;/P&gt;&lt;P&gt;The second dimension does not seem to be correct. If I remove the "TOTAL" keyword I get an error, but with the "TOTAL" key word it looks like the decile are calculated over the complete table and per week.&lt;/P&gt;&lt;P&gt;Any idea?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Lionel&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Feb 2011 14:32:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Decile-analysis-combined-with-another-dimension/m-p/218592#M71679</guid>
      <dc:creator />
      <dc:date>2011-02-16T14:32:28Z</dc:date>
    </item>
    <item>
      <title>Decile analysis combined with another dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Decile-analysis-combined-with-another-dimension/m-p/218593#M71680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;&lt;P&gt;I had the same problem and I would love read an answer on this question.&lt;/P&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Feb 2011 15:24:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Decile-analysis-combined-with-another-dimension/m-p/218593#M71680</guid>
      <dc:creator>gchampion</dc:creator>
      <dc:date>2011-02-17T15:24:44Z</dc:date>
    </item>
    <item>
      <title>Decile analysis combined with another dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Decile-analysis-combined-with-another-dimension/m-p/218594#M71681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm kind of stabbing in the dark without an example to play with, but perhaps where you currently have TOTAL, instead use TOTAL &amp;lt;WeekNo&amp;gt;? That tells the total to respect the difference in week numbers, which sounds on the surface like what you want.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2011 00:00:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Decile-analysis-combined-with-another-dimension/m-p/218594#M71681</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-02-18T00:00:05Z</dc:date>
    </item>
    <item>
      <title>Decile analysis combined with another dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Decile-analysis-combined-with-another-dimension/m-p/218595#M71682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is the example I used to verify the formula.&lt;/P&gt;&lt;P&gt;On the left simulation of the fractile in the LOAD (result expected) and on the right simulation of the fractile in formula.&lt;/P&gt;&lt;P&gt;Your tips works in the measure (top table) but not in the calculate dimension (bottom table) (//Error in calculation...).&lt;/P&gt;&lt;P&gt;Do you have an idea ?&lt;/P&gt;&lt;P&gt;Another question could you please tell me which solution seems to be the best one between LOAD and Formula (if it is possible;-)) ?&lt;/P&gt;&lt;P&gt;Thanx a lot for your answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2011 00:14:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Decile-analysis-combined-with-another-dimension/m-p/218595#M71682</guid>
      <dc:creator>gchampion</dc:creator>
      <dc:date>2011-02-18T00:14:29Z</dc:date>
    </item>
    <item>
      <title>Decile analysis combined with another dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Decile-analysis-combined-with-another-dimension/m-p/218596#M71683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok I found the solution for the formula:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(AGGR(sum(montant),compte_id, week)&amp;lt;=&lt;B&gt;aggr(NODISTINCT&lt;/B&gt; fractile(TOTAL &amp;lt;week&amp;gt; aggr(sum(montant), compte_id, week),0.80),&lt;B&gt;week)&lt;/B&gt;,'P-80%',&lt;/P&gt;&lt;P&gt;if(aggr(sum(montant), compte_id, week)&amp;lt;=&lt;B&gt;aggr(NODISTINCT&lt;/B&gt; fractile(TOTAL &amp;lt;week&amp;gt; aggr(sum(montant), compte_id, week),0.96)&lt;B&gt;,week)&lt;/B&gt;,'M-16%','G-4%'))&lt;/P&gt;&lt;P&gt;See attachement.&lt;/P&gt;&lt;P&gt;Lionel do you confirm that it works in your case ?&lt;/P&gt;&lt;P&gt;John, so now I have 2 solutions in the LOAD script and in the formula which one will be the best in term of performance and maintenance ?&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2011 00:31:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Decile-analysis-combined-with-another-dimension/m-p/218596#M71683</guid>
      <dc:creator>gchampion</dc:creator>
      <dc:date>2011-02-18T00:31:02Z</dc:date>
    </item>
    <item>
      <title>Decile analysis combined with another dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Decile-analysis-combined-with-another-dimension/m-p/218597#M71684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;gchampion wrote:John, so now I have 2 solutions in the LOAD script and in the formula which one will be the best in term of performance and maintenance ?&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Well, a load script solution will always outperform a chart equivalent since it only has to calculate once per load instead of once every time someone looks at the chart. However, load solutions may also be less flexible, in that they won't be sensitive to selections, and won't be sensitive to any dimensions other than the ones you chose at the time of the load.&lt;/P&gt;&lt;P&gt;I do my aggregation in charts for those reasons. As long as it performs adequately for your needs, I would use the chart expression.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2011 00:38:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Decile-analysis-combined-with-another-dimension/m-p/218597#M71684</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-02-18T00:38:54Z</dc:date>
    </item>
    <item>
      <title>Decile analysis combined with another dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Decile-analysis-combined-with-another-dimension/m-p/218598#M71685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, it does work, thanks a lot &lt;IMG alt="Big Smile" src="http://community.qlik.com/emoticons/emotion-2.gif" /&gt; !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To understand the solution, what are the respective impacts of both aggr functions and TOTAL and NODISTINCT keywords in this formula?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks !&lt;/P&gt;&lt;P&gt;Lionel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2011 10:05:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Decile-analysis-combined-with-another-dimension/m-p/218598#M71685</guid>
      <dc:creator />
      <dc:date>2011-02-18T10:05:32Z</dc:date>
    </item>
    <item>
      <title>Decile analysis combined with another dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Decile-analysis-combined-with-another-dimension/m-p/218599#M71686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hello. I will like to ask how do i replace "aggr", if i want to perform decile analysis in the "load script" instead? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 07:25:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Decile-analysis-combined-with-another-dimension/m-p/218599#M71686</guid>
      <dc:creator />
      <dc:date>2011-10-25T07:25:37Z</dc:date>
    </item>
  </channel>
</rss>

