<?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: Nested If or Aggr query in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Nested-If-or-Aggr-query/m-p/314221#M115967</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum(aggr( if(count([101FormNo]),1,0) ,InNumber))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Dec 2011 14:52:28 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2011-12-20T14:52:28Z</dc:date>
    <item>
      <title>Nested If or Aggr query</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-If-or-Aggr-query/m-p/314220#M115966</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;&lt;/P&gt;&lt;P&gt;I hope someone might be able to help me as I have been struggling with an expression. I have tried both a Sum(If and an aggregated sum but cant get it to do quite what I want. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a set of data as below &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 405px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl22" height="17" width="98"&gt;InNumber&lt;/TD&gt;&lt;TD class="xl22" style="border-left: medium none;" width="99"&gt;FormKey&lt;/TD&gt;&lt;TD class="xl22" style="border-left: medium none;" width="144"&gt;101FormNo&lt;/TD&gt;&lt;TD class="xl22" style="border-left: medium none;" width="64"&gt;Counter&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl23" height="17" style="border-top: medium none;" width="98"&gt;1107251157&lt;/TD&gt;&lt;TD class="xl23" style="border-left: medium none; border-top: medium none;" width="99"&gt;1912129&lt;/TD&gt;&lt;TD class="xl24" style="border-left: medium none; border-top: medium none;" width="144"&gt;&lt;/TD&gt;&lt;TD class="xl23" style="border-left: medium none; border-top: medium none;" width="64"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl23" height="17" style="border-top: medium none;" width="98"&gt;1107251157&lt;/TD&gt;&lt;TD class="xl23" style="border-left: medium none; border-top: medium none;" width="99"&gt;1912132&lt;/TD&gt;&lt;TD class="xl24" style="border-left: medium none; border-top: medium none;" width="144"&gt;&lt;/TD&gt;&lt;TD class="xl23" style="border-left: medium none; border-top: medium none;" width="64"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl23" height="17" style="border-top: medium none;" width="98"&gt;1107251157&lt;/TD&gt;&lt;TD class="xl23" style="border-left: medium none; border-top: medium none;" width="99"&gt;1927766&lt;/TD&gt;&lt;TD class="xl24" style="border-left: medium none; border-top: medium none;" width="144"&gt;&lt;/TD&gt;&lt;TD class="xl23" style="border-left: medium none; border-top: medium none;" width="64"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl23" height="17" style="border-top: medium none;" width="98"&gt;1107251157&lt;/TD&gt;&lt;TD class="xl23" style="border-left: medium none; border-top: medium none;" width="99"&gt;1931821&lt;/TD&gt;&lt;TD class="xl23" style="border-left: medium none; border-top: medium none;" width="144"&gt;747106&lt;/TD&gt;&lt;TD class="xl23" style="border-left: medium none; border-top: medium none;" width="64"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl23" height="17" style="border-top: medium none;" width="98"&gt;1107251157&lt;/TD&gt;&lt;TD class="xl23" style="border-left: medium none; border-top: medium none;" width="99"&gt;1933693&lt;/TD&gt;&lt;TD class="xl24" style="border-left: medium none; border-top: medium none;" width="144"&gt;&lt;/TD&gt;&lt;TD class="xl23" style="border-left: medium none; border-top: medium none;" width="64"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl23" height="17" style="border-top: medium none;" width="98"&gt;1107251157&lt;/TD&gt;&lt;TD class="xl23" style="border-left: medium none; border-top: medium none;" width="99"&gt;1935247&lt;/TD&gt;&lt;TD class="xl23" style="border-left: medium none; border-top: medium none;" width="144"&gt;747106&lt;/TD&gt;&lt;TD class="xl23" style="border-left: medium none; border-top: medium none;" width="64"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl23" height="17" style="border-top: medium none;" width="98"&gt;1107251157&lt;/TD&gt;&lt;TD class="xl23" style="border-left: medium none; border-top: medium none;" width="99"&gt;1992536&lt;/TD&gt;&lt;TD class="xl23" style="border-left: medium none; border-top: medium none;" width="144"&gt;747105&lt;/TD&gt;&lt;TD class="xl23" style="border-left: medium none; border-top: medium none;" width="64"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl23" height="17" style="border-top: medium none;" width="98"&gt;1107251157&lt;/TD&gt;&lt;TD class="xl23" style="border-left: medium none; border-top: medium none;" width="99"&gt;2027356&lt;/TD&gt;&lt;TD class="xl23" style="border-left: medium none; border-top: medium none;" width="144"&gt;747104&lt;/TD&gt;&lt;TD class="xl23" style="border-left: medium none; border-top: medium none;" width="64"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl23" height="17" style="border-top: medium none;" width="98"&gt;1107251157&lt;/TD&gt;&lt;TD class="xl23" style="border-left: medium none; border-top: medium none;" width="99"&gt;2027357&lt;/TD&gt;&lt;TD class="xl23" style="border-left: medium none; border-top: medium none;" width="144"&gt;747107&lt;/TD&gt;&lt;TD class="xl23" style="border-left: medium none; border-top: medium none;" width="64"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to do a count of the 101FormNo column for each InNumber which as it stands would return 5, my problem is that if the InNumber has more than 1 101FormNo's against it I only want to return the value 1. I just need to know if there is a value for each InNumber and not how many there are or when I try to do a % completion formula instead of getting 100% to say there is a match I get 500% which when you expand this to the full dataset causes the figure to be &lt;SPAN style="font-family: 'Times New Roman'; font-size: 12pt;"&gt;skewed&lt;/SPAN&gt;. &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;Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2011 14:16:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-If-or-Aggr-query/m-p/314220#M115966</guid>
      <dc:creator />
      <dc:date>2011-12-20T14:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: Nested If or Aggr query</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-If-or-Aggr-query/m-p/314221#M115967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum(aggr( if(count([101FormNo]),1,0) ,InNumber))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2011 14:52:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-If-or-Aggr-query/m-p/314221#M115967</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-12-20T14:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: Nested If or Aggr query</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-If-or-Aggr-query/m-p/314222#M115968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks for you help that worked really well. My calculations look much better now. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2011 15:42:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-If-or-Aggr-query/m-p/314222#M115968</guid>
      <dc:creator />
      <dc:date>2011-12-20T15:42:05Z</dc:date>
    </item>
  </channel>
</rss>

