<?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: Set Analysis for counting customers in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-for-counting-customers/m-p/630269#M231317</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ramya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting the Min date of a customer by iterating through the Aggr, and checking whether the minimum date is equal to the given month using if.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aggr is just like Group by in SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 May 2014 01:59:22 GMT</pubDate>
    <dc:creator>jagan</dc:creator>
    <dc:date>2014-05-29T01:59:22Z</dc:date>
    <item>
      <title>Set Analysis for counting customers</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-for-counting-customers/m-p/630266#M231314</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 need to write a set analysis to c&lt;SPAN style="color: #1f497d; font-family: Calibri, sans-serif; font-size: 15px;"&gt;ount of all customers whose first invoice falls in a particular month.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d; font-family: Calibri, sans-serif; font-size: 15px;"&gt;Can you please help with that?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d; font-family: Calibri, sans-serif; font-size: 15px;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d; font-family: Calibri, sans-serif; font-size: 15px;"&gt;Saurabh &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2014 23:27:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-for-counting-customers/m-p/630266#M231314</guid>
      <dc:creator />
      <dc:date>2014-05-27T23:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis for counting customers</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-for-counting-customers/m-p/630267#M231315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ramya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum(Aggr(If(MonthName(Min(DateFieldName)) = 'May 2014', 1, 0), Customer)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : The first invoice is considered as the invoice which is having the lowest date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2014 01:52:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-for-counting-customers/m-p/630267#M231315</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-05-28T01:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis for counting customers</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-for-counting-customers/m-p/630268#M231316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks...it works&lt;/P&gt;&lt;P&gt;just one question....may i know your process to reach to this expression..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2014 12:42:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-for-counting-customers/m-p/630268#M231316</guid>
      <dc:creator />
      <dc:date>2014-05-28T12:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis for counting customers</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-for-counting-customers/m-p/630269#M231317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ramya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting the Min date of a customer by iterating through the Aggr, and checking whether the minimum date is equal to the given month using if.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aggr is just like Group by in SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2014 01:59:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-for-counting-customers/m-p/630269#M231317</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-05-29T01:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis for counting customers</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-for-counting-customers/m-p/630270#M231318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks...&lt;/P&gt;&lt;P&gt;Now I need to do one more task...I need to sum the total amount for those customers who has their first invoices in that month.&lt;/P&gt;&lt;P&gt;It supposed to built upon this expression...&lt;/P&gt;&lt;P&gt;The Amount column is in different table named Txn and there is one to many relationship between Customer and Txn Table...i.e. there could be multiple lines in Txn Table for each customer and we need to sum the amount on all these lines if this customer has its first invoice in this month.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Saurabh &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2014 16:44:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-for-counting-customers/m-p/630270#M231318</guid>
      <dc:creator />
      <dc:date>2014-05-29T16:44:44Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis for counting customers</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-for-counting-customers/m-p/630271#M231319</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;Try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #edf8ca;"&gt;=Sum(Aggr(If(MonthName(Min(DateFieldName)) = 'May 2014', Sum(Sales), 0), Customer)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #edf8ca;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #edf8ca;"&gt;Hope this helps you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #edf8ca;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #edf8ca;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #edf8ca;"&gt;Jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 01:51:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-for-counting-customers/m-p/630271#M231319</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-05-30T01:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Set Analysis for counting customers</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-for-counting-customers/m-p/630272#M231320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;Hi Jagan,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;It works with a small glitch...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 12pt;"&gt;It calculates the sum of sales for all invoices for those customers in that particular month who had their first invoices fallen in that month.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 12pt;"&gt;Like if Customer 1 had two invoice on 3/25 and 3/27 then it supposed to take the invoice of only 3/25 and not on of 3/27...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 12pt;"&gt;Right now it matches the customer with all transactions in txn table...we perhaps need to put a filter for date so it could choose amount only on the first invoice...i.e. only on 3/25 and not on 3/27&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 12pt;"&gt;here is something that i tried&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;=Sum(Aggr(If(MonthName(Min(Date)) =&lt;SPAN style="color: #3d3d3d; background-color: #edf8ca;"&gt; 'May 2014'&lt;/SPAN&gt;, Sum(Transactions.TxnDate={$(=&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;FirstSortedValue((Transactions.TxnDate), Aggr(Min(TxnDate),CustomerListID, Date)&lt;/STRONG&gt;&lt;/SPAN&gt;))}&amp;gt;}Sales), 0), CustomerListID))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;The expression &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;FirstSortedValue((Transactions.TxnDate), Aggr(Min({&amp;lt;AccountType={'Income'}&amp;gt;}Transactions.TxnDate),CustomerListID, Date)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;gives the correct value when used alone but It is not working when i put this here and the total amount turns out to be zero.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;Any Idea?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;Here is a data set&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: calibri, verdana, arial, sans-serif;"&gt;It supposed to sum the amount of first invoice of all those customers whose first invoice has fallen in to a particular month.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: calibri, verdana, arial, sans-serif;"&gt;For Example...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Customer&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; First Invoice&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Invoice in May 2103&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: calibri, verdana, arial, sans-serif;"&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cust1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3/25/2103&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3/25/2013&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;&amp;nbsp; $25&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: calibri, verdana, arial, sans-serif;"&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cust1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3/25/2013&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3/27/2013&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; $125&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: calibri, verdana, arial, sans-serif;"&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cust2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3/15/2013&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3/15/2103&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; $100&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: calibri, verdana, arial, sans-serif;"&gt;4.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cust2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3/15/2013&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3/18/2013&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; $120&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: calibri, verdana, arial, sans-serif;"&gt;5.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cust4&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; 1/2/2013&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3/28/2013&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; $100&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: calibri, verdana, arial, sans-serif;"&gt;So the output I need is sum of amount of 1 and 3 i.e. 25&amp;nbsp; + 100 = $125.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;Saurabh &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 16:23:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-for-counting-customers/m-p/630272#M231320</guid>
      <dc:creator />
      <dc:date>2014-05-30T16:23:51Z</dc:date>
    </item>
  </channel>
</rss>

