<?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: Get count from multiple results. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Get-count-from-multiple-results/m-p/827076#M1043230</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In front end using set analysis...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Status 1 Tickets = 3 (A, C, D)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; count(distinct {&amp;lt;Status={'1'}&amp;gt;}Ticket)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Status non 1 Tickets = 1 (B)&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt; count(distinct Ticket) - count(distinct {&amp;lt;Status={'1'}&amp;gt;}Ticket)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Nov 2014 14:43:37 GMT</pubDate>
    <dc:creator>PradeepReddy</dc:creator>
    <dc:date>2014-11-27T14:43:37Z</dc:date>
    <item>
      <title>Get count from multiple results.</title>
      <link>https://community.qlik.com/t5/QlikView/Get-count-from-multiple-results/m-p/827071#M1043225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys ive got a problem, i think its simple but I cant seem to get it working, here is the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have several Tickets lets say A, B, C, D, and during time the tickets change status so Ticket A has been status 1, 2 and 3, ticket B has been status 2 and 3, Ticket C haben been status 1 and 2 and Ticket D has been status 1 and 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like so;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="250" style="border: 1px solid #000000; width: 187px; height: 225px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Ticket&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Status&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;C&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;C&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;D&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;D&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I want a calculation that counts the number of tickets that have ever been status 1 and the number of tickets that have had any status expect 1.&lt;/P&gt;&lt;P&gt;SO in this case the result would be.&lt;/P&gt;&lt;P&gt;Status 1 Tickets = 3 (A, C, D)&lt;/P&gt;&lt;P&gt;Status non 1 Tickets = 1 (B)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Nov 2014 14:19:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-count-from-multiple-results/m-p/827071#M1043225</guid>
      <dc:creator />
      <dc:date>2014-11-27T14:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: Get count from multiple results.</title>
      <link>https://community.qlik.com/t5/QlikView/Get-count-from-multiple-results/m-p/827072#M1043226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Status 1 Tickets = 3 (A, C, D) :&amp;nbsp; &lt;/SPAN&gt;Count(distinct {&amp;lt;Ticket=p({&amp;lt;Status={1}&amp;gt;}Ticket)&amp;gt;}Ticket)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Status non 1 Tickets = 1 (B): Count(distinct {&amp;lt;Ticket=e({&amp;lt;Status={1}&amp;gt;}Ticket)&amp;gt;}Ticket)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Nov 2014 14:36:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-count-from-multiple-results/m-p/827072#M1043226</guid>
      <dc:creator>syukyo_zhu</dc:creator>
      <dc:date>2014-11-27T14:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: Get count from multiple results.</title>
      <link>https://community.qlik.com/t5/QlikView/Get-count-from-multiple-results/m-p/827073#M1043227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would load your data&lt;/P&gt;&lt;P&gt;then get the min(Status) by Ticket&lt;/P&gt;&lt;P&gt;temp:&lt;/P&gt;&lt;P&gt;Load Ticket, min(Status) as Status&lt;/P&gt;&lt;P&gt;resident your_table&lt;/P&gt;&lt;P&gt;group by Ticket;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;temp2:&lt;/P&gt;&lt;P&gt;load * if(status=1, 1,0) as Got_Status_1&lt;/P&gt;&lt;P&gt;resident temp;&lt;/P&gt;&lt;P&gt;drop table temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inner join(your_table)&lt;/P&gt;&lt;P&gt;load Ticket, Got_status_1 resident temp2;&lt;/P&gt;&lt;P&gt;drop table temp2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your expression will be &lt;/P&gt;&lt;P&gt;count(distinct {&amp;lt;Got_Status_1={1}&amp;gt;} Ticket) for those who got 1 at least once&lt;/P&gt;&lt;P&gt;the second would be count(distinct {&amp;lt;Got_Status_1={0}&amp;gt;} Ticket)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Nov 2014 14:37:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-count-from-multiple-results/m-p/827073#M1043227</guid>
      <dc:creator>ali_hijazi</dc:creator>
      <dc:date>2014-11-27T14:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: Get count from multiple results.</title>
      <link>https://community.qlik.com/t5/QlikView/Get-count-from-multiple-results/m-p/827074#M1043228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gualter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use set analysis expressions, both to:&lt;/P&gt;&lt;P&gt;1. c&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;ount the number of tickets that have been status 1:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;=Count({$ &amp;lt;Status={1}&amp;gt;} &lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;DISTINCT&lt;/STRONG&gt; Ticket)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2. &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;count the number of tickets that have been any status but 1:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =Aggr(Count({$ &amp;lt;Status=-{1}&amp;gt;} DISTINCT Ticket), Ticket)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Giacomo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Nov 2014 14:42:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-count-from-multiple-results/m-p/827074#M1043228</guid>
      <dc:creator>giacomom</dc:creator>
      <dc:date>2014-11-27T14:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: Get count from multiple results.</title>
      <link>https://community.qlik.com/t5/QlikView/Get-count-from-multiple-results/m-p/827075#M1043229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry I should have made a better example, my Status are actual Strings and not numbers, so I cant use Min or Max.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Nov 2014 14:43:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-count-from-multiple-results/m-p/827075#M1043229</guid>
      <dc:creator />
      <dc:date>2014-11-27T14:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: Get count from multiple results.</title>
      <link>https://community.qlik.com/t5/QlikView/Get-count-from-multiple-results/m-p/827076#M1043230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In front end using set analysis...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Status 1 Tickets = 3 (A, C, D)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; count(distinct {&amp;lt;Status={'1'}&amp;gt;}Ticket)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Status non 1 Tickets = 1 (B)&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt; count(distinct Ticket) - count(distinct {&amp;lt;Status={'1'}&amp;gt;}Ticket)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Nov 2014 14:43:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-count-from-multiple-results/m-p/827076#M1043230</guid>
      <dc:creator>PradeepReddy</dc:creator>
      <dc:date>2014-11-27T14:43:37Z</dc:date>
    </item>
    <item>
      <title>Re: Get count from multiple results.</title>
      <link>https://community.qlik.com/t5/QlikView/Get-count-from-multiple-results/m-p/827077#M1043231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you looked at &lt;A href="https://community.qlik.com/people/syukyo_ZHU"&gt;syukyo_ZHU&lt;/A&gt; solution(further up)?&lt;/P&gt;&lt;P&gt;Should work perfectly and it is fast.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Nov 2014 15:03:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-count-from-multiple-results/m-p/827077#M1043231</guid>
      <dc:creator>jerrysvensson</dc:creator>
      <dc:date>2014-11-27T15:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: Get count from multiple results.</title>
      <link>https://community.qlik.com/t5/QlikView/Get-count-from-multiple-results/m-p/827078#M1043232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can use minstring&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Nov 2014 15:08:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-count-from-multiple-results/m-p/827078#M1043232</guid>
      <dc:creator>ali_hijazi</dc:creator>
      <dc:date>2014-11-27T15:08:37Z</dc:date>
    </item>
  </channel>
</rss>

