<?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: Problem with a subquery to field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-a-subquery-to-field/m-p/964905#M330841</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;THANKS GUYS. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;Both answers are correct .&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Aug 2015 02:48:37 GMT</pubDate>
    <dc:creator>rulohx87</dc:creator>
    <dc:date>2015-08-27T02:48:37Z</dc:date>
    <item>
      <title>Problem with a subquery to field</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-a-subquery-to-field/m-p/964902#M330838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN class="hps"&gt;Hello everyone&lt;/SPAN&gt;.&lt;BR /&gt;&lt;BR /&gt; &lt;SPAN class="hps"&gt;I have a problem.&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;How&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;I can&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;make an inquiry to&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;a query?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="0" cellspacing="0" style="border: none; padding: 0 5.4pt 0 5.4pt;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="69"&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;STATUS&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: solid windowtext 1.0pt; border-left: none; padding: 0 5.4pt 0 5.4pt;" valign="top" width="56"&gt;CODE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; border-top: none; padding: 0 5.4pt 0 5.4pt;" valign="top" width="69"&gt;&lt;P align="center" style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;BD&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="56"&gt;&lt;P align="center" style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;001&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; border-top: none; padding: 0 5.4pt 0 5.4pt;" valign="top" width="69"&gt;&lt;P align="center" style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;BG&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="56"&gt;&lt;P align="center" style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;002&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; border-top: none; padding: 0 5.4pt 0 5.4pt;" valign="top" width="69"&gt;&lt;P align="center" style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;NP&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="56"&gt;&lt;P align="center" style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;002&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; border-top: none; padding: 0 5.4pt 0 5.4pt;" valign="top" width="69"&gt;&lt;P align="center" style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;NP&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="56"&gt;&lt;P align="center" style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;003&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; border-top: none; padding: 0 5.4pt 0 5.4pt;" valign="top" width="69"&gt;&lt;P align="center" style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;C&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="56"&gt;&lt;P align="center" style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;003&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; border-top: none; padding: 0 5.4pt 0 5.4pt;" valign="top" width="69"&gt;&lt;P align="center" style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;B&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="56"&gt;&lt;P align="center" style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;004&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; border-top: none; padding: 0 5.4pt 0 5.4pt;" valign="top" width="69"&gt;&lt;P align="center" style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;C&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="56"&gt;&lt;P align="center" style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;005&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; border-top: none; padding: 0 5.4pt 0 5.4pt;" valign="top" width="69"&gt;&lt;P align="center" style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;NP&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="56"&gt;&lt;P align="center" style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;006&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; border-top: none; padding: 0 5.4pt 0 5.4pt;" valign="top" width="69"&gt;&lt;P align="center" style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;B&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="56"&gt;&lt;P align="center" style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;006&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; border-top: none; padding: 0 5.4pt 0 5.4pt;" valign="top" width="69"&gt;&lt;P align="center" style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;P&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="56"&gt;&lt;P align="center" style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;001&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; border-top: none; padding: 0 5.4pt 0 5.4pt;" valign="top" width="69"&gt;&lt;P align="center" style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;BG&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="56"&gt;&lt;P align="center" style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;007&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; border-top: none; padding: 0 5.4pt 0 5.4pt;" valign="top" width="69"&gt;&lt;P align="center" style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;B&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="56"&gt;&lt;P align="center" style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;002&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; border-top: none; padding: 0 5.4pt 0 5.4pt;" valign="top" width="69"&gt;&lt;P align="center" style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;BD&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="56"&gt;&lt;P align="center" style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;008&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;RULE: Get the number of status codes that contain a "B". Provided that the same code does not contain a different status (P, C.NP )&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;If you have a formula like ; count ( { &amp;lt; Status = {" B * "} &amp;gt;} code ) we obtain 7. However, the result has a different status codes "P , C , NP". They should not be counted .&lt;BR /&gt;&lt;BR /&gt;Example.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN class="hps"&gt;001&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;contains a&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;"BD&lt;/SPAN&gt;, P" &lt;SPAN class="hps"&gt;status&lt;/SPAN&gt;&lt;BR /&gt; &lt;SPAN class="hps"&gt;002&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;contains a&lt;/SPAN&gt; &lt;SPAN class="hps atn"&gt;status "&lt;/SPAN&gt;BG, NP ,B&lt;SPAN class="hps"&gt;"&lt;/SPAN&gt;&lt;BR /&gt; &lt;SPAN class="hps"&gt;004&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;contains&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;status&lt;/SPAN&gt; &lt;SPAN class="hps atn"&gt;"B" (&lt;/SPAN&gt;Correct Score)&lt;BR /&gt; &lt;SPAN class="hps"&gt;006&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;contains&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;status&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;"B&lt;/SPAN&gt;, NP"&lt;BR /&gt; &lt;SPAN class="hps"&gt;007&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;contains&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;status&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;"BG"&lt;/SPAN&gt; &lt;SPAN class="hps atn"&gt;(&lt;/SPAN&gt;Correct Score&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt; &lt;SPAN class="hps"&gt;008&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;containing&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;"BD"&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;status&lt;/SPAN&gt; &lt;SPAN class="hps atn"&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Correct Score&lt;/SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt; &lt;SPAN class="hps"&gt;My&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;result is&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;4. Based on&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the rule.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I CHANGE: 002 contains a status "BG, NP ,B" (Correct Score) BY 002 contains a status "BG, NP ,B"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2015 15:33:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-a-subquery-to-field/m-p/964902#M330838</guid>
      <dc:creator>rulohx87</dc:creator>
      <dc:date>2015-08-20T15:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with a subquery to field</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-a-subquery-to-field/m-p/964903#M330839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Based on your rules, the answer should be 3 with the given data (002 contains BG and NP, so it shouldn't count).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This formula does the trick:&lt;/P&gt;&lt;P&gt;=sum(aggr(if(count({&amp;lt;STATUS={'B*'}&amp;gt;}total &amp;lt;CODE&amp;gt; CODE)=count(total &amp;lt;CODE&amp;gt; CODE),1,0),CODE))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example file is also attached.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2015 15:49:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-a-subquery-to-field/m-p/964903#M330839</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2015-08-20T15:49:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with a subquery to field</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-a-subquery-to-field/m-p/964904#M330840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sum(aggr(count({$ &amp;lt;CODE=P({$&amp;lt;STATUS={"B*"}&amp;gt;} CODE)&amp;gt;-&amp;lt;CODE=P({$&amp;lt;STATUS=-{"B*"}&amp;gt;} CODE)&amp;gt;} CODE), CODE))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2015 16:24:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-a-subquery-to-field/m-p/964904#M330840</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-08-20T16:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with a subquery to field</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-a-subquery-to-field/m-p/964905#M330841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;THANKS GUYS. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;Both answers are correct .&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Aug 2015 02:48:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-a-subquery-to-field/m-p/964905#M330841</guid>
      <dc:creator>rulohx87</dc:creator>
      <dc:date>2015-08-27T02:48:37Z</dc:date>
    </item>
  </channel>
</rss>

