<?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 Counting data in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Counting-data/m-p/233972#M85473</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ivan,&lt;/P&gt;&lt;P&gt;The easiest solution would be a count(distinct if(A&amp;gt;0 and A&amp;gt;B,Dimension,null())) if A and B are fields, but if A and B formulated then try something like the 4 formulas below:&lt;/P&gt;&lt;P&gt;sum(aggr(if(A&amp;gt;0 and A&amp;gt;B,1,0),Dimensions))&lt;/P&gt;&lt;P&gt;sum(aggr(if(A&amp;gt;0 and A&amp;lt;B,1,0),Dimensions))&lt;/P&gt;&lt;P&gt;sum(aggr(if(A&amp;lt;0 and A&amp;lt;B,1,0),Dimensions))&lt;/P&gt;&lt;P&gt;sum(aggr(if(A&amp;lt;0 and A&amp;gt;B,1,0),Dimensions))&lt;/P&gt;&lt;P&gt;where A and B are the formulas from the columns surrounded by the aggr() function that list the dimensiones of the table at the end of the aggr function. If the formulas con long and complex save them as a variable and call the variable in each formula. These formulas would work in 4 separate text objects.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Oct 2010 17:32:07 GMT</pubDate>
    <dc:creator>pover</dc:creator>
    <dc:date>2010-10-11T17:32:07Z</dc:date>
    <item>
      <title>Counting data</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-data/m-p/233971#M85472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;May I ask a counting issue as follow:&lt;/P&gt;&lt;P&gt;I have monthly data for 2 columns A and B.&lt;/P&gt;&lt;P&gt;in the table, I check every month:&lt;/P&gt;&lt;P&gt;If A &amp;gt;0&lt;/P&gt;&lt;P&gt;-&amp;gt;if A &amp;gt;B then value = 1 else value =2&lt;/P&gt;&lt;P&gt;If A&amp;lt;0&lt;/P&gt;&lt;P&gt;-&amp;gt;if A &amp;gt;B then value = -1 else value =-2&lt;/P&gt;&lt;P&gt;I want to find the total numbers of -2, -1, 1, 2 for all time period in Chart (not in script, since B is choosen by users).&lt;/P&gt;&lt;P&gt;How can I write the formula?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Ivan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Oct 2010 17:09:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-data/m-p/233971#M85472</guid>
      <dc:creator />
      <dc:date>2010-10-11T17:09:52Z</dc:date>
    </item>
    <item>
      <title>Counting data</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-data/m-p/233972#M85473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ivan,&lt;/P&gt;&lt;P&gt;The easiest solution would be a count(distinct if(A&amp;gt;0 and A&amp;gt;B,Dimension,null())) if A and B are fields, but if A and B formulated then try something like the 4 formulas below:&lt;/P&gt;&lt;P&gt;sum(aggr(if(A&amp;gt;0 and A&amp;gt;B,1,0),Dimensions))&lt;/P&gt;&lt;P&gt;sum(aggr(if(A&amp;gt;0 and A&amp;lt;B,1,0),Dimensions))&lt;/P&gt;&lt;P&gt;sum(aggr(if(A&amp;lt;0 and A&amp;lt;B,1,0),Dimensions))&lt;/P&gt;&lt;P&gt;sum(aggr(if(A&amp;lt;0 and A&amp;gt;B,1,0),Dimensions))&lt;/P&gt;&lt;P&gt;where A and B are the formulas from the columns surrounded by the aggr() function that list the dimensiones of the table at the end of the aggr function. If the formulas con long and complex save them as a variable and call the variable in each formula. These formulas would work in 4 separate text objects.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Oct 2010 17:32:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-data/m-p/233972#M85473</guid>
      <dc:creator>pover</dc:creator>
      <dc:date>2010-10-11T17:32:07Z</dc:date>
    </item>
    <item>
      <title>Counting data</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-data/m-p/233973#M85474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since you don't specify any value for A=0, I'll assume 0.&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;sum(aggr(sign(A)*(2+(A&amp;gt;B)),Month))&lt;/P&gt;&lt;P&gt;Or the more readable:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;sum(aggr(sign(A)*if(A&amp;gt;B,1,2),Month))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Oct 2010 00:23:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-data/m-p/233973#M85474</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-10-12T00:23:16Z</dc:date>
    </item>
    <item>
      <title>Counting data</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-data/m-p/233974#M85475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for both Karl and John. It is working fine. cheers!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Oct 2010 08:50:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-data/m-p/233974#M85475</guid>
      <dc:creator />
      <dc:date>2010-10-12T08:50:22Z</dc:date>
    </item>
  </channel>
</rss>

