<?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: Select if exists in column in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Select-if-exists-in-column/m-p/302252#M1193560</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;Your code should be as follows.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Table2:&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Load * ;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;SELECT caseno FROM table2;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;LOAD id as [TR ID],&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; caseno as [TR Case No],&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; daterecorded as [TR Date],&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; actiontype as [TR Action Type],&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; owner as [Owner],&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; handler as [Worked on By] &lt;/EM&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;EM&gt;Where exists(caseno,caseno ) and &lt;STRONG&gt;&lt;EM&gt;daterecorded &amp;gt;= Date(Date#('2010-11-01','YYYY-MM-DD)'&lt;STRONG&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;EM&gt;,'YYYY-MM-DD')&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;EM&gt;; //Make sure that Daterecorded date formate matches with '&lt;STRONG&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;EM&gt;YYYY-MM-DD'&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;SQL SELECT * &lt;/EM&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;EM&gt;FROM table;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Drop Table &lt;STRONG&gt;&lt;EM&gt;Table2;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;EM&gt;-Sridhar&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Jun 2011 12:43:58 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-06-20T12:43:58Z</dc:date>
    <item>
      <title>Select if exists in column</title>
      <link>https://community.qlik.com/t5/QlikView/Select-if-exists-in-column/m-p/302249#M1193557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi - thanks in advance for any replies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table which has the following fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;File No&lt;/P&gt;&lt;P&gt;Owner&lt;/P&gt;&lt;P&gt;Worked on By&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to create a report with a dimension of Worked on By and count(File No) - this works fine&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I also need the ffollowing which is proving more difficult:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Worked on By is in (Select distinct Owner) - flag as '1', otherwise flag as '0'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to have the table with Worked on By and count(File No) with an additional column, and the value in this column depends if they are an Owner or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So something like if they exist in the Owner column flag as '1'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this makes sense, thanks again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jun 2011 09:05:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-if-exists-in-column/m-p/302249#M1193557</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-20T09:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: Select if exists in column</title>
      <link>https://community.qlik.com/t5/QlikView/Select-if-exists-in-column/m-p/302250#M1193558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;&lt;EM&gt;Hi,&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;&lt;EM&gt;Please can you post the sample QV document? It will be easy to try with some data...&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;&lt;EM&gt;Thanks - &lt;STRONG&gt;DV&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jun 2011 09:24:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-if-exists-in-column/m-p/302250#M1193558</guid>
      <dc:creator>IAMDV</dc:creator>
      <dc:date>2011-06-20T09:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: Select if exists in column</title>
      <link>https://community.qlik.com/t5/QlikView/Select-if-exists-in-column/m-p/302251#M1193559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry I don't have a sample document but here's some of the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TimeRecording:&lt;/P&gt;&lt;P&gt;LOAD id as [TR ID],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; caseno as [TR Case No],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; daterecorded as [TR Date],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; actiontype as [TR Action Type],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; owner as [Owner],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; handler as [Worked on By],;&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM table&lt;/P&gt;&lt;P&gt;WHERE daterecorded &amp;gt;= '2010-11-01'&lt;/P&gt;&lt;P&gt;AND caseno in (SELECT caseno FROM table2);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jun 2011 11:57:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-if-exists-in-column/m-p/302251#M1193559</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-20T11:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: Select if exists in column</title>
      <link>https://community.qlik.com/t5/QlikView/Select-if-exists-in-column/m-p/302252#M1193560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;Your code should be as follows.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Table2:&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Load * ;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;SELECT caseno FROM table2;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;LOAD id as [TR ID],&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; caseno as [TR Case No],&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; daterecorded as [TR Date],&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; actiontype as [TR Action Type],&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; owner as [Owner],&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; handler as [Worked on By] &lt;/EM&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;EM&gt;Where exists(caseno,caseno ) and &lt;STRONG&gt;&lt;EM&gt;daterecorded &amp;gt;= Date(Date#('2010-11-01','YYYY-MM-DD)'&lt;STRONG&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;EM&gt;,'YYYY-MM-DD')&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;EM&gt;; //Make sure that Daterecorded date formate matches with '&lt;STRONG&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;EM&gt;YYYY-MM-DD'&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;SQL SELECT * &lt;/EM&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;EM&gt;FROM table;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Drop Table &lt;STRONG&gt;&lt;EM&gt;Table2;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;EM&gt;-Sridhar&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jun 2011 12:43:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-if-exists-in-column/m-p/302252#M1193560</guid>
      <dc:creator />
      <dc:date>2011-06-20T12:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: Select if exists in column</title>
      <link>https://community.qlik.com/t5/QlikView/Select-if-exists-in-column/m-p/302253#M1193561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply, I may not have described the issue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This statement works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TimeRecording:&lt;/P&gt;&lt;P&gt;LOAD id as [TR ID],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; caseno as [TR Case No],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; daterecorded as [TR Date],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; actiontype as [TR Action Type],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; owner as [Owner],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; handler as [Worked on By];&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM table;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I also need something like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;handlertype as Owner if the value in handler exists somewhere in owner field (not just the same row)&lt;/P&gt;&lt;P&gt;otherwise handlertype as Assistant &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that makes it clearer, thanks again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jun 2011 13:38:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-if-exists-in-column/m-p/302253#M1193561</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-20T13:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: Select if exists in column</title>
      <link>https://community.qlik.com/t5/QlikView/Select-if-exists-in-column/m-p/302254#M1193562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Same Exists would do the job for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD&lt;STRONG&gt; IF(Exists(owner,handler) or owner = handler, 'Owner ','Assistant' ) as handlertype,&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id as [TR ID],&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; caseno as [TR Case No],&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; daterecorded as [TR Date],&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; actiontype as [TR Action Type],&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; owner as [Owner],&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; handler as [Worked on By];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SQL SELECT *&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM table;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;I have create dummy working application. Have a look at the attched application.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Hope this helps you.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;- Sridhar&lt;/STRONG&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jun 2011 14:03:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-if-exists-in-column/m-p/302254#M1193562</guid>
      <dc:creator />
      <dc:date>2011-06-20T14:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: Select if exists in column</title>
      <link>https://community.qlik.com/t5/QlikView/Select-if-exists-in-column/m-p/302255#M1193563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excellent - thanks for your quick response&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jun 2011 15:29:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-if-exists-in-column/m-p/302255#M1193563</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-20T15:29:03Z</dc:date>
    </item>
  </channel>
</rss>

