<?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: script to count in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/script-to-count/m-p/1197111#M884362</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;Thanks for your quick reply.&lt;/P&gt;&lt;P&gt;I added new field Product , derived new field STATUS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now it is not showing correct data.&lt;/P&gt;&lt;P&gt;When STATUS=A selected sum(STATUS_A where Product=P1)=1&lt;/P&gt;&lt;P&gt;When STATUS=B selected sum(STATUS_B where &lt;SPAN style="font-size: 13.3333px;"&gt;Product=P1&lt;/SPAN&gt;)=1&lt;/P&gt;&lt;P&gt;When STATUS=C selected sum(STATUS_B where &lt;SPAN style="font-size: 13.3333px;"&gt;Product=P1&lt;/SPAN&gt;)=3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/139353_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [EMPNO,ENAME,STATUS_A,STATUS_B,STATUS_C,Product&lt;/P&gt;&lt;P&gt;100,E1,0,0,1,P1&lt;/P&gt;&lt;P&gt;200,E2,0,1,0,P1&lt;/P&gt;&lt;P&gt;300,E3,1,0,0,P1&lt;/P&gt;&lt;P&gt;400,E4,0,0,1,P1&lt;/P&gt;&lt;P&gt;500,E5,1,0,0,P2&lt;/P&gt;&lt;P&gt;600,E6,0,0,1,P2&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AggrData:&lt;/P&gt;&lt;P&gt;LOAD EMPNO,ENAME,Product,&lt;/P&gt;&lt;P&gt;if(Sum(STATUS_A)&amp;gt;=1,'A',If(Sum(STATUS_B)&amp;gt;=1,'B',if(Sum(STATUS_C)&amp;gt;=1,'C'))) as STATUS,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Sum(STATUS_A) as CountSTATUS_A,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Sum(STATUS_B) as CountSTATUS_B,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Sum(STATUS_C) as CountSTATUS_C,&lt;/P&gt;&lt;P&gt;&amp;nbsp; RangeSum(Sum(STATUS_A), Sum(STATUS_B), Sum(STATUS_C)) as TotalCount&lt;/P&gt;&lt;P&gt;Resident DATA&lt;/P&gt;&lt;P&gt;Group by EMPNO,ENAME,Product;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table DATA;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 01 Oct 2016 01:12:28 GMT</pubDate>
    <dc:creator>arethaking</dc:creator>
    <dc:date>2016-10-01T01:12:28Z</dc:date>
    <item>
      <title>script to count</title>
      <link>https://community.qlik.com/t5/QlikView/script-to-count/m-p/1197109#M884360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have a Employee Status table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [EMPNO,ENAME,STATUS_A,STATUS_B,STATUS_C&lt;/P&gt;&lt;P&gt;100,E1,0,0,1&lt;/P&gt;&lt;P&gt;200,E2,0,1,0&lt;/P&gt;&lt;P&gt;300,E3,1,0,0&lt;/P&gt;&lt;P&gt;400,E4,0,1,1&lt;/P&gt;&lt;P&gt;500,E5,1,1,0&lt;/P&gt;&lt;P&gt;600,E6,0,0,1&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Need to write the script to show below details.&lt;/P&gt;&lt;P&gt;Count(STATUS_A)=2&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Count(STATUS_B)=3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Count(STATUS_A)=3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;SUM(&lt;SPAN style="font-size: 13.3333px;"&gt;STATUS_A+STATUS_B+STATUS_C)=8&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thanks in advance.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/script-to-count/m-p/1197109#M884360</guid>
      <dc:creator>arethaking</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: script to count</title>
      <link>https://community.qlik.com/t5/QlikView/script-to-count/m-p/1197110#M884361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where do you want to do this? Script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DATA:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * INLINE [EMPNO,ENAME,STATUS_A,STATUS_B,STATUS_C&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;100,E1,0,0,1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;200,E2,0,1,0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;300,E3,1,0,0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;400,E4,0,1,1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;500,E5,1,1,0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;600,E6,0,0,1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AggrData:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Sum(STATUS_A) as CountSTATUS_A,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Sum(STATUS_B) as CountSTATUS_B,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Sum(STATUS_C) as CountSTATUS_C,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; RangeSum(Sum(STATUS_A), Sum(STATUS_B), Sum(STATUS_C)) as TotalCount&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident DATA;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Sep 2016 23:57:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/script-to-count/m-p/1197110#M884361</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-09-30T23:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: script to count</title>
      <link>https://community.qlik.com/t5/QlikView/script-to-count/m-p/1197111#M884362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;Thanks for your quick reply.&lt;/P&gt;&lt;P&gt;I added new field Product , derived new field STATUS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now it is not showing correct data.&lt;/P&gt;&lt;P&gt;When STATUS=A selected sum(STATUS_A where Product=P1)=1&lt;/P&gt;&lt;P&gt;When STATUS=B selected sum(STATUS_B where &lt;SPAN style="font-size: 13.3333px;"&gt;Product=P1&lt;/SPAN&gt;)=1&lt;/P&gt;&lt;P&gt;When STATUS=C selected sum(STATUS_B where &lt;SPAN style="font-size: 13.3333px;"&gt;Product=P1&lt;/SPAN&gt;)=3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/139353_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [EMPNO,ENAME,STATUS_A,STATUS_B,STATUS_C,Product&lt;/P&gt;&lt;P&gt;100,E1,0,0,1,P1&lt;/P&gt;&lt;P&gt;200,E2,0,1,0,P1&lt;/P&gt;&lt;P&gt;300,E3,1,0,0,P1&lt;/P&gt;&lt;P&gt;400,E4,0,0,1,P1&lt;/P&gt;&lt;P&gt;500,E5,1,0,0,P2&lt;/P&gt;&lt;P&gt;600,E6,0,0,1,P2&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AggrData:&lt;/P&gt;&lt;P&gt;LOAD EMPNO,ENAME,Product,&lt;/P&gt;&lt;P&gt;if(Sum(STATUS_A)&amp;gt;=1,'A',If(Sum(STATUS_B)&amp;gt;=1,'B',if(Sum(STATUS_C)&amp;gt;=1,'C'))) as STATUS,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Sum(STATUS_A) as CountSTATUS_A,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Sum(STATUS_B) as CountSTATUS_B,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Sum(STATUS_C) as CountSTATUS_C,&lt;/P&gt;&lt;P&gt;&amp;nbsp; RangeSum(Sum(STATUS_A), Sum(STATUS_B), Sum(STATUS_C)) as TotalCount&lt;/P&gt;&lt;P&gt;Resident DATA&lt;/P&gt;&lt;P&gt;Group by EMPNO,ENAME,Product;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table DATA;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Oct 2016 01:12:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/script-to-count/m-p/1197111#M884362</guid>
      <dc:creator>arethaking</dc:creator>
      <dc:date>2016-10-01T01:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: script to count</title>
      <link>https://community.qlik.com/t5/QlikView/script-to-count/m-p/1197112#M884363</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 like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;CrossTable(Status, Count, 3)&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;EMPNO,ENAME,Product, STATUS_A,STATUS_B,STATUS_C&lt;/P&gt;&lt;P&gt;INLINE [&lt;/P&gt;&lt;P&gt;EMPNO,ENAME,STATUS_A,STATUS_B,STATUS_C,Product&lt;/P&gt;&lt;P&gt;100,E1,0,0,1,P1&lt;/P&gt;&lt;P&gt;200,E2,0,1,0,P1&lt;/P&gt;&lt;P&gt;300,E3,1,0,0,P1&lt;/P&gt;&lt;P&gt;400,E4,0,0,1,P1&lt;/P&gt;&lt;P&gt;500,E5,1,0,0,P2&lt;/P&gt;&lt;P&gt;600,E6,0,0,1,P2&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Oct 2016 04:45:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/script-to-count/m-p/1197112#M884363</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2016-10-01T04:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: script to count</title>
      <link>https://community.qlik.com/t5/QlikView/script-to-count/m-p/1197113#M884364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Missed to attach set analysis expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Set Analysis Expression:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;=Count({&amp;lt;Count={'1'}&amp;gt;}Status)&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Regards,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Oct 2016 04:46:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/script-to-count/m-p/1197113#M884364</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2016-10-01T04:46:05Z</dc:date>
    </item>
  </channel>
</rss>

