<?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 Re: count total customer who placed orders in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/count-total-customer-who-placed-orders/m-p/1161501#M378672</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try like this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aggr(count(&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;CustomerId&lt;/SPAN&gt;),&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;OrderDate)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 02 Jul 2016 05:55:37 GMT</pubDate>
    <dc:creator>avinashelite</dc:creator>
    <dc:date>2016-07-02T05:55:37Z</dc:date>
    <item>
      <title>count total customer who placed orders</title>
      <link>https://community.qlik.com/t5/QlikView/count-total-customer-who-placed-orders/m-p/1161499#M378670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my data model...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Order Table contains CustomerId &amp;amp; OrderDate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And CustomerTable is not a left join so it loads all the customer even if there are no orders&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the best expression &lt;SPAN style="font-size: 13.3333px;"&gt;to count total number of customers who placed orders in previous month&lt;/SPAN&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jul 2016 05:31:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-total-customer-who-placed-orders/m-p/1161499#M378670</guid>
      <dc:creator />
      <dc:date>2016-07-02T05:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: count total customer who placed orders</title>
      <link>https://community.qlik.com/t5/QlikView/count-total-customer-who-placed-orders/m-p/1161500#M378671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aggr(Total(customers),Orders)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Declare previous month.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jul 2016 05:51:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-total-customer-who-placed-orders/m-p/1161500#M378671</guid>
      <dc:creator>ajsjoshua</dc:creator>
      <dc:date>2016-07-02T05:51:57Z</dc:date>
    </item>
    <item>
      <title>Re: count total customer who placed orders</title>
      <link>https://community.qlik.com/t5/QlikView/count-total-customer-who-placed-orders/m-p/1161501#M378672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try like this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aggr(count(&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;CustomerId&lt;/SPAN&gt;),&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;OrderDate)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jul 2016 05:55:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-total-customer-who-placed-orders/m-p/1161501#M378672</guid>
      <dc:creator>avinashelite</dc:creator>
      <dc:date>2016-07-02T05:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: count total customer who placed orders</title>
      <link>https://community.qlik.com/t5/QlikView/count-total-customer-who-placed-orders/m-p/1161502#M378673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can try it&lt;/P&gt;&lt;P&gt;=Count(DISTINCT(if (not IsNull(&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;OrderDate&lt;/SPAN&gt;) , &lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;CustomerId&lt;/SPAN&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and if you want to get customer in &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;previous month you can add your condition in if cluse&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Count(DISTINCT(if (not IsNull(&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;OrderDate&lt;/SPAN&gt;) and &lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;OrderDate&lt;/SPAN&gt;='&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;previous month&lt;/SPAN&gt;', &lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;CustomerId&lt;/SPAN&gt;))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jul 2016 07:36:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-total-customer-who-placed-orders/m-p/1161502#M378673</guid>
      <dc:creator>marjan_it</dc:creator>
      <dc:date>2016-07-02T07:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: count total customer who placed orders</title>
      <link>https://community.qlik.com/t5/QlikView/count-total-customer-who-placed-orders/m-p/1161503#M378674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lokesh, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will work for you&lt;/P&gt;&lt;P&gt;=sum(aggr(if(count(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;OrderDate&lt;/SPAN&gt;)&amp;gt;0,1),&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;CustomerId&lt;/SPAN&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I must insist that you make changes to your data model instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A better way would be to use ApplyMap to find records in your Orders table and add a Flag to your Customer table .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Happy Qlik'ing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Vineeth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jul 2016 08:14:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-total-customer-who-placed-orders/m-p/1161503#M378674</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2016-07-02T08:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: count total customer who placed orders</title>
      <link>https://community.qlik.com/t5/QlikView/count-total-customer-who-placed-orders/m-p/1161504#M378675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vineeth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;very good suggestion but I am new to qlikview and don't know how to flag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a reason why I have not joined the customer table because the order table has half a million records. Where as we only have total 15 customers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I have simply left the Customer table separate as QlikView automatically joined Orders with Customer based on CustomerID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also not all the customers place orders all the time so sometime on the dashboard users should be able to see all the customers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What are the benefits of Flags? and how to do it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jul 2016 10:30:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-total-customer-who-placed-orders/m-p/1161504#M378675</guid>
      <dc:creator />
      <dc:date>2016-07-02T10:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: count total customer who placed orders</title>
      <link>https://community.qlik.com/t5/QlikView/count-total-customer-who-placed-orders/m-p/1161505#M378676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lets assume the below is your load script, (has to be in the particular order)&lt;/P&gt;&lt;P&gt;//LOAD YOUR Orders TABLE&lt;/P&gt;&lt;P&gt;ORDERS:&lt;/P&gt;&lt;P&gt;LOAD * &lt;/P&gt;&lt;P&gt;FROM SOURCE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//LOAD DISTINCT CustomerID available in Orders table&lt;/P&gt;&lt;P&gt;MAP_OrderFlag:&lt;/P&gt;&lt;P&gt;Mapping LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DISTINCT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;CustomerId,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Ordered' as OrderFlag&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;RESIDENT ORDERS;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Now load Customers Table with Applymap &lt;/P&gt;&lt;P&gt;Customers:&lt;/P&gt;&lt;P&gt;CustomerID,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ApplyMap('&lt;SPAN style="font-size: 13.3333px;"&gt;MAP_OrderFlag&lt;/SPAN&gt;',&lt;SPAN style="font-size: 13.3333px;"&gt;CustomerID,'Not Ordered'&lt;/SPAN&gt;)&amp;nbsp; as OrderFlag&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;FROM SOURCE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ApplyMap works like vlookup in Excel , if it finds a matching customer ID it will retrieve value 'Ordered' if not found, it will place value as 'Not Ordered'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Benefit:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now your expression will be : count({&amp;lt;OrderFlag = {'Not Ordered'}&amp;gt;}CustomerID) &lt;/P&gt;&lt;P&gt;This will be evaluated on your customers table with 15 rows instead of the your Orders table which has millions of rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope I've clarified well&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Vineeth.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jul 2016 10:44:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-total-customer-who-placed-orders/m-p/1161505#M378676</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2016-07-02T10:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: count total customer who placed orders</title>
      <link>https://community.qlik.com/t5/QlikView/count-total-customer-who-placed-orders/m-p/1161506#M378677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lokesh,&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I think a good way to proceed would be to script a master calendar with a numeric MonthID. &lt;/P&gt;&lt;P&gt;that would make writing expressions to give you the answer you want easy but you can still write one that works:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count({$&amp;lt;Date = {'&amp;gt;=$(=MonthsStart(1,AddMonths(today(),-1)))&amp;lt;=$(=MonthsEnd(1,AddMonths(today(),-1)))'}&amp;gt;}DISTINCT CustomerId])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will give you the number of customers that ordered during the month previous to the currently selected month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Jul 2016 11:01:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-total-customer-who-placed-orders/m-p/1161506#M378677</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2016-07-03T11:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: count total customer who placed orders</title>
      <link>https://community.qlik.com/t5/QlikView/count-total-customer-who-placed-orders/m-p/1161507#M378678</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;Can you mark helpful/correct answers and close this post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;V&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jul 2016 07:13:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-total-customer-who-placed-orders/m-p/1161507#M378678</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2016-07-08T07:13:58Z</dc:date>
    </item>
  </channel>
</rss>

