<?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: AND condition on same field - script level in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/AND-condition-on-same-field-script-level/m-p/1656955#M730115</link>
    <description>&lt;P&gt;that will not work cause that condition will check if there is one row that fits both conditions. Thats not possible.&lt;/P&gt;&lt;P&gt;maybe you want to do it like this:&lt;/P&gt;&lt;P&gt;1) Add the field to your table&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if(Status='Open', 1,0) as FLAG_OPEN,
if(Status='Closed', 1,0) as FLAG_CLOSED,&lt;/LI-CODE&gt;&lt;P&gt;2) then you can create an aggregated table&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Aggregated:
Load ID,
     if(OPEN_STAGE=1 AND CLOSED_STAGE=1, 1,0) as FLAG_OPEN_AND_CLOSED
Load ID,
         max(FLAG_OPEN) as OPEN_STAGE,
         max(FLAG_CLOSED) as CLOSED_STAGE
Resident Input
GROUP BY ID

;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Dec 2019 09:50:19 GMT</pubDate>
    <dc:creator>zhadrakas</dc:creator>
    <dc:date>2019-12-12T09:50:19Z</dc:date>
    <item>
      <title>AND condition on same field - script level</title>
      <link>https://community.qlik.com/t5/QlikView/AND-condition-on-same-field-script-level/m-p/1656944#M730114</link>
      <description>&lt;P&gt;HI Community,&lt;/P&gt;&lt;P&gt;Can you please help me.&lt;/P&gt;&lt;P&gt;Need to Calculate – which ID has status both &lt;STRONG&gt;Open&lt;/STRONG&gt; and &lt;STRONG&gt;Closed&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;BR /&gt;ID, Status, Date&lt;BR /&gt;100, Open, 01/08/2019&lt;BR /&gt;100, Closed, 05/10/2019&lt;BR /&gt;101, Open, 22/11/2019&lt;BR /&gt;102, Open, 10/11/2019&lt;BR /&gt;102, Pending, 22/11/2019&lt;BR /&gt;102, Closed, 10/12/2019&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;OutPut:&lt;BR /&gt;ID, Status, Date&lt;BR /&gt;100, Open, 01/08/2019&lt;BR /&gt;100, Closed, 05/10/2019&lt;BR /&gt;102, Open, 10/11/2019&lt;BR /&gt;102, Closed, 10/12/2019&lt;/P&gt;&lt;P&gt;Have written like this - but not working.&lt;/P&gt;&lt;P&gt;where Status='Open' and Status='Closed';&lt;/P&gt;&lt;P&gt;Thanks In Advance!&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 01:42:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AND-condition-on-same-field-script-level/m-p/1656944#M730114</guid>
      <dc:creator>Nagaraju_KCS</dc:creator>
      <dc:date>2024-11-16T01:42:56Z</dc:date>
    </item>
    <item>
      <title>Re: AND condition on same field - script level</title>
      <link>https://community.qlik.com/t5/QlikView/AND-condition-on-same-field-script-level/m-p/1656955#M730115</link>
      <description>&lt;P&gt;that will not work cause that condition will check if there is one row that fits both conditions. Thats not possible.&lt;/P&gt;&lt;P&gt;maybe you want to do it like this:&lt;/P&gt;&lt;P&gt;1) Add the field to your table&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if(Status='Open', 1,0) as FLAG_OPEN,
if(Status='Closed', 1,0) as FLAG_CLOSED,&lt;/LI-CODE&gt;&lt;P&gt;2) then you can create an aggregated table&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Aggregated:
Load ID,
     if(OPEN_STAGE=1 AND CLOSED_STAGE=1, 1,0) as FLAG_OPEN_AND_CLOSED
Load ID,
         max(FLAG_OPEN) as OPEN_STAGE,
         max(FLAG_CLOSED) as CLOSED_STAGE
Resident Input
GROUP BY ID

;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Dec 2019 09:50:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AND-condition-on-same-field-script-level/m-p/1656955#M730115</guid>
      <dc:creator>zhadrakas</dc:creator>
      <dc:date>2019-12-12T09:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: AND condition on same field - script level</title>
      <link>https://community.qlik.com/t5/QlikView/AND-condition-on-same-field-script-level/m-p/1659146#M730116</link>
      <description>&lt;P&gt;Did the suggestion from the post help you with the use case?&amp;nbsp; If so, be sure you return to the post and use the Accept as Solution button on that post to give the poster credit for the assistance and let other Community Members know the solution worked.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are still trying to sort things out, leave an update with what additional help you require.&amp;nbsp; The only other thing I have is a link to the Design Blog area of Communiity, you can search there to see if you can find something that might fit too.&amp;nbsp; There are usually multiple ways to do things, but the post should work from what I can see, not sure if there is something more efficient potentially or not.&amp;nbsp; My post will also kick things back up, and someone else may have another look and potentially offer up a different idea too.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2019 19:40:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AND-condition-on-same-field-script-level/m-p/1659146#M730116</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2019-12-18T19:40:23Z</dc:date>
    </item>
  </channel>
</rss>

