<?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: Field Count in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Field-Count/m-p/742094#M264977</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please see attached.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Mar 2015 12:57:01 GMT</pubDate>
    <dc:creator>jsakalis</dc:creator>
    <dc:date>2015-03-18T12:57:01Z</dc:date>
    <item>
      <title>Field Count</title>
      <link>https://community.qlik.com/t5/QlikView/Field-Count/m-p/742087#M264970</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 have three fields. Invoice_number, status and date. An invoice_number can change status during time. That means it can change from status A to status B and then to status A etc. This can happen many times during a period of a year. My goal is to create three text objects, one with the total number of invoices, the other with&amp;nbsp; total number of invoices in Status A and the last one with&amp;nbsp; total number of invoices in Status B. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that we have to take into account only the last change of status.&amp;nbsp; For example the invoice_number 52578 has to count it only one at status A date 5/8/2014.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 12:15:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-Count/m-p/742087#M264970</guid>
      <dc:creator />
      <dc:date>2015-03-18T12:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: Field Count</title>
      <link>https://community.qlik.com/t5/QlikView/Field-Count/m-p/742088#M264971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got very close with what you want not sure why B is 481. PFA the application&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/81134_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;Have a look while I continue to troubleshoot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 12:27:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-Count/m-p/742088#M264971</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-03-18T12:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: Field Count</title>
      <link>https://community.qlik.com/t5/QlikView/Field-Count/m-p/742089#M264972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See attached qvw. I got a count of 2279 for A, not 2277 because invoices 269432 and 219219 have the same data for A and B.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 12:32:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-Count/m-p/742089#M264972</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-03-18T12:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: Field Count</title>
      <link>https://community.qlik.com/t5/QlikView/Field-Count/m-p/742090#M264973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, that's beacuse InvoiceNumber 219219 and 269432 has the same max Date for each Status.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eleni, it should be debugged in data, probably adding time, or in the requirements specifying wich status should be counted when this happens, or if they should count in both status (Then the sum of each status will not sum the total of distinct invoice numbers).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 12:44:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-Count/m-p/742090#M264973</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-03-18T12:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: Field Count</title>
      <link>https://community.qlik.com/t5/QlikView/Field-Count/m-p/742091#M264974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Damn man, how did you figure that out? It would have taken me a long time to figure that out. What was your trick to figure it out?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 12:47:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-Count/m-p/742091#M264974</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-03-18T12:47:40Z</dc:date>
    </item>
    <item>
      <title>Re: Field Count</title>
      <link>https://community.qlik.com/t5/QlikView/Field-Count/m-p/742092#M264975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/laugh.png" /&gt;&lt;/P&gt;&lt;P&gt;I used Gysbert solution, selected IsLatest='1'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I created a straigth tabe with Invoice_Number as dimension and Count(Date) as expression, sorting descing by expression there were this two invoices counting '2', all the other only count '1'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 12:50:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-Count/m-p/742092#M264975</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-03-18T12:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: Field Count</title>
      <link>https://community.qlik.com/t5/QlikView/Field-Count/m-p/742093#M264976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sweet. I was thinking of troubleshooting it in Excel. It never crossed my mind to use QlikView itself to do that. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 12:53:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-Count/m-p/742093#M264976</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-03-18T12:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: Field Count</title>
      <link>https://community.qlik.com/t5/QlikView/Field-Count/m-p/742094#M264977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please see attached.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 12:57:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-Count/m-p/742094#M264977</guid>
      <dc:creator>jsakalis</dc:creator>
      <dc:date>2015-03-18T12:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Field Count</title>
      <link>https://community.qlik.com/t5/QlikView/Field-Count/m-p/742095#M264978</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;Thank you all for your help.&lt;/P&gt;&lt;P&gt;The problem is that all these solutions works fine for one year.&lt;/P&gt;&lt;P&gt;What if we have an invoice with status A at 30/12/2013 and change to Status B at 2/1/2014?&lt;/P&gt;&lt;P&gt;If we are going to use max(Date) in the script we will get 2/1/2014 in field date although we select 2013 in year.&lt;/P&gt;&lt;P&gt;Let me know if you need more info.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Eleni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 14:35:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-Count/m-p/742095#M264978</guid>
      <dc:creator />
      <dc:date>2015-03-18T14:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: Field Count</title>
      <link>https://community.qlik.com/t5/QlikView/Field-Count/m-p/742096#M264979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eleni, you can use:&lt;/P&gt;&lt;P&gt;Status A:&lt;/P&gt;&lt;P&gt;=Sum(Aggr(If(Max({&amp;lt;Invoice_Status={'A'}&amp;gt;} Date)=Max(Date), 1), Invoice_Number))&lt;/P&gt;&lt;P&gt;Status B:&lt;/P&gt;&lt;P&gt;Sum(Aggr(If(Max({&amp;lt;Invoice_Status={'B'}&amp;gt;} Date)=Max(Date), 1), Invoice_Number))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 14:46:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-Count/m-p/742096#M264979</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-03-18T14:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: Field Count</title>
      <link>https://community.qlik.com/t5/QlikView/Field-Count/m-p/742097#M264980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ruben,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's good but it's not working properly when you make a status selection.&lt;/P&gt;&lt;P&gt;The ideal senario is to have a single text object which is going to show Total Invoices without Selections, Status A invoices with selection A in field status and &lt;SPAN style="font-size: 13.3333330154419px;"&gt;Status B invoices with selection B in field status. And of course it has to works fine for any other selection (e.g. year, quarter, month e.t.c.).&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 15:07:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-Count/m-p/742097#M264980</guid>
      <dc:creator />
      <dc:date>2015-03-18T15:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: Field Count</title>
      <link>https://community.qlik.com/t5/QlikView/Field-Count/m-p/742098#M264981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eleni,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If I understood, you are interested in knowing the last status change that occurs in any year for a given Invoice_Number.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; See attached. Some changes were made to simulate 2013 records and group by to also use year.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Filtering on year will give numbers specific to that year, based on last status change.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 15:15:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-Count/m-p/742098#M264981</guid>
      <dc:creator>jsakalis</dc:creator>
      <dc:date>2015-03-18T15:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: Field Count</title>
      <link>https://community.qlik.com/t5/QlikView/Field-Count/m-p/742099#M264982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi eleni,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure of wch selections should work and wich not, can this give the desired result?:&lt;/P&gt;&lt;P&gt;='Total count:'&amp;amp; count({&amp;lt;Invoice_Status&amp;gt;} distinct Invoice_Number)&lt;/P&gt;&lt;P&gt;&amp;amp; Chr(13) &amp;amp; 'Count Status A: ' &amp;amp; sum({1}Aggr(If(Max({&amp;lt;Invoice_Status={'A'}&amp;gt;} Date)=Max({&amp;lt;Invoice_Status&amp;gt;} Date), 1), Invoice_Number))&lt;/P&gt;&lt;P&gt;&amp;amp; Chr(13) &amp;amp; 'Count Status B: ' &amp;amp; sum({1}Aggr(If(Max({&amp;lt;Invoice_Status={'B'}&amp;gt;} Date)=Max({&amp;lt;Invoice_Status&amp;gt;} Date), 1), Invoice_Number))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 15:17:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-Count/m-p/742099#M264982</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-03-18T15:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: Field Count</title>
      <link>https://community.qlik.com/t5/QlikView/Field-Count/m-p/742100#M264983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your solution works fine when the invoice has no lines, but if there are lines it doesn't.&lt;/P&gt;&lt;P&gt;Any help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Eleni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2015 08:56:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-Count/m-p/742100#M264983</guid>
      <dc:creator />
      <dc:date>2015-03-19T08:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: Field Count</title>
      <link>https://community.qlik.com/t5/QlikView/Field-Count/m-p/742101#M264984</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;Thank you all for your help and ideas were more than valuable!&lt;/P&gt;&lt;P&gt;I finally resolve it based on John's idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Eleni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2015 11:23:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-Count/m-p/742101#M264984</guid>
      <dc:creator />
      <dc:date>2015-03-19T11:23:28Z</dc:date>
    </item>
  </channel>
</rss>

