<?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 How to calculate who the top customer is in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-calculate-who-the-top-customer-is/m-p/325810#M1191096</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 would try with a Chart. &lt;/P&gt;&lt;P&gt;One dimension: Customer, and two expressions:sum(SalesAmount) and sum(Quantity). You can sort the chart in descending order by the first expression.&lt;/P&gt;&lt;P&gt;I would use a Listbox with the Product list to select the desired product(s).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Jun 2011 06:52:17 GMT</pubDate>
    <dc:creator>salto</dc:creator>
    <dc:date>2011-06-28T06:52:17Z</dc:date>
    <item>
      <title>How to calculate who the top customer is</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-who-the-top-customer-is/m-p/325809#M1191095</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 would like to add column in my table to display what customer is the biggest buyer for a product. And in the next column I would like to show how many that customer bought from that product.&lt;/P&gt;&lt;P&gt;Pseudo code for customer name: Print Name where max(sum(InvQty))&lt;/P&gt;&lt;P&gt;Pseudo code for qty: Print qty where max(sum(InvQty))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2011 06:41:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-who-the-top-customer-is/m-p/325809#M1191095</guid>
      <dc:creator />
      <dc:date>2011-06-28T06:41:49Z</dc:date>
    </item>
    <item>
      <title>How to calculate who the top customer is</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-who-the-top-customer-is/m-p/325810#M1191096</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 would try with a Chart. &lt;/P&gt;&lt;P&gt;One dimension: Customer, and two expressions:sum(SalesAmount) and sum(Quantity). You can sort the chart in descending order by the first expression.&lt;/P&gt;&lt;P&gt;I would use a Listbox with the Product list to select the desired product(s).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2011 06:52:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-who-the-top-customer-is/m-p/325810#M1191096</guid>
      <dc:creator>salto</dc:creator>
      <dc:date>2011-06-28T06:52:17Z</dc:date>
    </item>
    <item>
      <title>How to calculate who the top customer is</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-who-the-top-customer-is/m-p/325811#M1191097</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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Create a Straight Table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Give Customer as Dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Add expression as Sum(InvQty)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Go to Sort Give sort oder as Sum(InvQty)&amp;nbsp; -&amp;gt; select Numeric Value -&amp;gt; Descending for Top Customers and then at the bottom keep Customer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2011 06:56:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-who-the-top-customer-is/m-p/325811#M1191097</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2011-06-28T06:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate who the top customer is</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-who-the-top-customer-is/m-p/325812#M1191098</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;Assuming the following script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD Repeat(Chr(64 + Ceil(Rand() * 3)), 3) AS ProdID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Repeat(Chr(64 + Ceil(Rand() * 3)), 5) AS CustomerID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ceil(Rand() * 1000) AS Qty&lt;/P&gt;&lt;P&gt;AUTOGENERATE 5; // 5 records so its easier to check whether the results return as expected but you can increase this value&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to generate some dummy data, create a new straight table chart, set ProdID as dimension, and add a calculated dimension as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;=If(Aggr(Rank(Sum(Qty)), ProdID, CustomerID) = 1, CustomerID)&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will return the top buyer for each value in ProdID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now use this expression to get how much the top buyer has bought&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;If(Aggr(Rank(Sum(Qty)), ProdID, CustomerID) = 1, Sum(Qty))&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that makes sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2011 08:42:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-who-the-top-customer-is/m-p/325812#M1191098</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-06-28T08:42:47Z</dc:date>
    </item>
    <item>
      <title>How to calculate who the top customer is</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-who-the-top-customer-is/m-p/325813#M1191099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi, Miguel.&lt;/P&gt;&lt;P&gt;That works! Thanks.&lt;/P&gt;&lt;P&gt;But how do I change the heading of that calculated dimension? I get the formula as column heading. Or perhaps I can hide that column? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2011 11:29:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-who-the-top-customer-is/m-p/325813#M1191099</guid>
      <dc:creator />
      <dc:date>2011-06-28T11:29:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate who the top customer is</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-who-the-top-customer-is/m-p/325814#M1191100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Andy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can set whatever label you want for both dimensions and expressions. Go to the chart properties, Dimensions tab click on the calculated dimension and change the Label, and for expressions do likewise in the Expressions tab. In the listbox, go to the properties and change the Title.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2011 11:35:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-who-the-top-customer-is/m-p/325814#M1191100</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-06-28T11:35:33Z</dc:date>
    </item>
  </channel>
</rss>

