<?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 Customer segmentation using avg &amp; stdev in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Customer-segmentation-using-avg-stdev/m-p/781528#M662013</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 still a nooby in Qlikview. I'm recently trying to do some basic customer segmentation. I'm trying to compare each customer's total sales with total average, then create a binary High/Low value (High if above total average and low&amp;nbsp; if else). I tried using:&lt;/P&gt;&lt;P&gt;if(Sum(sales)&amp;gt;=avg(aggr(sum(sales) , customer-code)),'High','Low')&lt;/P&gt;&lt;P&gt;but i didn't get the result that I wanted. Using TOTAL didn't help either. So instead I had to use:&lt;/P&gt;&lt;P&gt;if(sum(sales)&amp;gt;=(Sum(Total sales)/Count(Total DISTINCT customer-code)),'High','Low')&lt;/P&gt;&lt;P&gt;which works but it's not pretty at all! and also does not help me in my future segmentation. In the next step I'd like to segment customers in 3 segments: very high, high, low. I need something like this:&lt;/P&gt;&lt;P&gt;if(sum(sales)&amp;gt; average of all customers + 2 stdev of all customers, 'very high',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(sum(sales) &amp;gt; average of all customers&amp;nbsp; and sum(sales)&amp;lt;average of all customers + 2 stdev of all customers,'high',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'low')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ali&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Feb 2015 16:27:05 GMT</pubDate>
    <dc:creator>behdadian</dc:creator>
    <dc:date>2015-02-24T16:27:05Z</dc:date>
    <item>
      <title>Customer segmentation using avg &amp; stdev</title>
      <link>https://community.qlik.com/t5/QlikView/Customer-segmentation-using-avg-stdev/m-p/781528#M662013</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 still a nooby in Qlikview. I'm recently trying to do some basic customer segmentation. I'm trying to compare each customer's total sales with total average, then create a binary High/Low value (High if above total average and low&amp;nbsp; if else). I tried using:&lt;/P&gt;&lt;P&gt;if(Sum(sales)&amp;gt;=avg(aggr(sum(sales) , customer-code)),'High','Low')&lt;/P&gt;&lt;P&gt;but i didn't get the result that I wanted. Using TOTAL didn't help either. So instead I had to use:&lt;/P&gt;&lt;P&gt;if(sum(sales)&amp;gt;=(Sum(Total sales)/Count(Total DISTINCT customer-code)),'High','Low')&lt;/P&gt;&lt;P&gt;which works but it's not pretty at all! and also does not help me in my future segmentation. In the next step I'd like to segment customers in 3 segments: very high, high, low. I need something like this:&lt;/P&gt;&lt;P&gt;if(sum(sales)&amp;gt; average of all customers + 2 stdev of all customers, 'very high',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(sum(sales) &amp;gt; average of all customers&amp;nbsp; and sum(sales)&amp;lt;average of all customers + 2 stdev of all customers,'high',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'low')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ali&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Feb 2015 16:27:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Customer-segmentation-using-avg-stdev/m-p/781528#M662013</guid>
      <dc:creator>behdadian</dc:creator>
      <dc:date>2015-02-24T16:27:05Z</dc:date>
    </item>
  </channel>
</rss>

