<?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: If Statement Logic as Flag. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/If-Statement-Logic-as-Flag/m-p/36100#M6102</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wow. That's a nice approach you have there &lt;A href="https://community.qlik.com/qlik-users/258653"&gt;vnagaraju&lt;/A&gt;&amp;nbsp; . But the problem is I need this flag in the script and not expression. Can you perhaps help me out with how to modify the lines here? Much appreciated! Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Apr 2018 10:12:30 GMT</pubDate>
    <dc:creator>mrthomasshelby</dc:creator>
    <dc:date>2018-04-02T10:12:30Z</dc:date>
    <item>
      <title>If Statement Logic as Flag.</title>
      <link>https://community.qlik.com/t5/QlikView/If-Statement-Logic-as-Flag/m-p/36097#M6099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I have gotten stuck on making an if statement logic in the script. I have a table as below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="802"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="60"&gt;F2&lt;/TD&gt;&lt;TD width="80"&gt;Candidate 1&lt;/TD&gt;&lt;TD width="80"&gt;Candidate 2&lt;/TD&gt;&lt;TD width="80"&gt;Candidate 3&lt;/TD&gt;&lt;TD width="80"&gt;Candidate 4&lt;/TD&gt;&lt;TD width="80"&gt;Candidate 5&lt;/TD&gt;&lt;TD width="80"&gt;Candidate 6&lt;/TD&gt;&lt;TD width="80"&gt;Candidate 7&lt;/TD&gt;&lt;TD width="80"&gt;Candidate 8&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Criteria1&lt;/TD&gt;&lt;TD&gt;YES&lt;/TD&gt;&lt;TD&gt;YES&lt;/TD&gt;&lt;TD&gt;YES&lt;/TD&gt;&lt;TD&gt;YES&lt;/TD&gt;&lt;TD&gt;NO&lt;/TD&gt;&lt;TD&gt;NO&lt;/TD&gt;&lt;TD&gt;NO&lt;/TD&gt;&lt;TD&gt;NO&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;What I'm trying to do is create a flag with an if statement with the condition that if in Criteria 1, there are &amp;lt;5 'YES' responses, it's a 'Fail' flag and if there are &amp;gt;5 'YES' type responses, it's a 'Pass' flag. So, the above example will have a 'Fail' flag. I have been trying to figure out the logic for quite sometime now but couldn't arrive at a working logic. Please help me figure out the logic for this condition. TIA!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;A href="https://community.qlik.com/qlik-users/171708"&gt;stalwar1&lt;/A&gt;‌&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Mar 2018 13:42:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Statement-Logic-as-Flag/m-p/36097#M6099</guid>
      <dc:creator>mrthomasshelby</dc:creator>
      <dc:date>2018-03-30T13:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: If Statement Logic as Flag.</title>
      <link>https://community.qlik.com/t5/QlikView/If-Statement-Logic-as-Flag/m-p/36098#M6100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are your candidate 1, candidate 2 are your field names, I mean is this how your actual data looks like? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Mar 2018 14:15:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Statement-Logic-as-Flag/m-p/36098#M6100</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2018-03-30T14:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: If Statement Logic as Flag.</title>
      <link>https://community.qlik.com/t5/QlikView/If-Statement-Logic-as-Flag/m-p/36099#M6101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure if this is a good way. May be there is a shorter way of doing this. Check and try below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Tab1:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;CrossTable&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Criteria&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Values&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,1)&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;INLINE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[&lt;BR /&gt; F2, Candidate1, Candidate2, Candidate3, Candidate4, Candidate5, Candidate6, Candidate7, Candidate8 &lt;BR /&gt; Criteria1, YES, YES, YES, YES, YES, NO, NO, NO &lt;BR /&gt; ]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt; &lt;BR /&gt; Final:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;F2&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Criteria&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Values&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Values&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = 'YES', 1, 0) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ValFlag&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Tab1;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Drop&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Table&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Tab1; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;using a pivot table&lt;/P&gt;&lt;P&gt;Add F2, Criteria and Values as Dimensions&lt;/P&gt;&lt;P&gt;Epxr: &lt;SPAN style="font-size: 8pt;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;TOTAL&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ValFlag&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &amp;gt;= 5, 'Passed', 'Fail') &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/198034_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Mar 2018 14:52:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Statement-Logic-as-Flag/m-p/36099#M6101</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2018-03-30T14:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: If Statement Logic as Flag.</title>
      <link>https://community.qlik.com/t5/QlikView/If-Statement-Logic-as-Flag/m-p/36100#M6102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wow. That's a nice approach you have there &lt;A href="https://community.qlik.com/qlik-users/258653"&gt;vnagaraju&lt;/A&gt;&amp;nbsp; . But the problem is I need this flag in the script and not expression. Can you perhaps help me out with how to modify the lines here? Much appreciated! Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2018 10:12:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Statement-Logic-as-Flag/m-p/36100#M6102</guid>
      <dc:creator>mrthomasshelby</dc:creator>
      <dc:date>2018-04-02T10:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: If Statement Logic as Flag.</title>
      <link>https://community.qlik.com/t5/QlikView/If-Statement-Logic-as-Flag/m-p/36101#M6103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Tab1:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;CrossTable(Criteria, Values,1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD * INLINE [&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;F2, Candidate1, Candidate2, Candidate3, Candidate4, Candidate5, Candidate6, Candidate7, Candidate8&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Criteria1, YES, YES, YES, YES, YES, NO, NO, NO&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: 'courier new', courier;"&gt;Join&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #0000ff;"&gt;Load&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #0000ff;"&gt;&amp;nbsp; F2,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #0000ff;"&gt;&amp;nbsp; If( Count(if(Values='YES',Values))&amp;lt;5, 'Fail', 'Pass') as Flag&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: 'courier new', courier;"&gt;Resident Tab1 Group By F2;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2018 10:24:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Statement-Logic-as-Flag/m-p/36101#M6103</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2018-04-02T10:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: If Statement Logic as Flag.</title>
      <link>https://community.qlik.com/t5/QlikView/If-Statement-Logic-as-Flag/m-p/36102#M6104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! That works!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2018 11:22:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Statement-Logic-as-Flag/m-p/36102#M6104</guid>
      <dc:creator>mrthomasshelby</dc:creator>
      <dc:date>2018-04-02T11:22:48Z</dc:date>
    </item>
  </channel>
</rss>

