<?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 Select Excluded - How to Exclude Records Associated With Table Selection in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Select-Excluded-How-to-Exclude-Records-Associated-With-Table/m-p/218046#M71216</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As I understand it the Select Excluded doesn't work because of the many to one relationship.&lt;/P&gt;&lt;P&gt;So for example if select CptCode 'A' it will match to VisitID 55 and 27. But if I Select Exclude 'A' it will match to 55 and 38 because the 'C' that matches to 55 is not excluded. What I want is in the example is to only return 38.&lt;/P&gt;&lt;P&gt;CptCode | Code | VisitID&lt;/P&gt;&lt;P&gt;A | 1 | 55&lt;/P&gt;&lt;P&gt;C | 3 | 55&lt;/P&gt;&lt;P&gt;A | 1 | 27&lt;/P&gt;&lt;P&gt;B | 2 | 38&lt;/P&gt;&lt;P&gt;D | 4 | 38&lt;/P&gt;&lt;P&gt;E | 5 | 38&lt;/P&gt;&lt;P&gt;Your flag option seems plausible but it appears a bit too complicated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Dec 2010 16:02:30 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-12-09T16:02:30Z</dc:date>
    <item>
      <title>Select Excluded - How to Exclude Records Associated With Table Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Select-Excluded-How-to-Exclude-Records-Associated-With-Table/m-p/218044#M71214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a Many to One relationship between Charges and Visits. In my example below If I choose a 'CptCode' it matches to a 'VisitID' that matches the corresponding 'Code'.&lt;/P&gt;&lt;P&gt;What I would like to do is also select a 'CPTCode' and identify all visits that do not match. If I use 'Select Excluded' it will still pull some visits I don't want because it will only exclude visits where the excluded CPTCode is the only one on the visit.&lt;/P&gt;&lt;P&gt;I thought about a workaround by modifying the SQL but I don't think it should be necessary. What is the best approach?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD Code,&lt;BR /&gt; CptCode;&lt;BR /&gt;SQL SELECT Code,&lt;BR /&gt; CptCode&lt;BR /&gt;FROM WINDOPATH.dbo.WorkloadDefinitionTable;&lt;/P&gt;&lt;P&gt;ChargeSlipTable:&lt;BR /&gt;LOAD Code,&lt;BR /&gt; Visit As VisitID;&lt;BR /&gt;SQL SELECT Code,&lt;BR /&gt; SuperobjectID,&lt;BR /&gt; Visit&lt;BR /&gt;FROM WINDOPATH.dbo.ChargeSlipTable;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Dec 2010 21:04:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-Excluded-How-to-Exclude-Records-Associated-With-Table/m-p/218044#M71214</guid>
      <dc:creator />
      <dc:date>2010-12-08T21:04:43Z</dc:date>
    </item>
    <item>
      <title>Select Excluded - How to Exclude Records Associated With Table Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Select-Excluded-How-to-Exclude-Records-Associated-With-Table/m-p/218045#M71215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am a bit confused to why Select Excluded didnt work. Anyhow what about Select Excluded on VisitID it might fix the problem.&lt;/P&gt;&lt;P&gt;If you just need the to show a resulting calculation in a graph you could use set analysis.&lt;/P&gt;&lt;P&gt;Another way is to make a "flag" per distinct value in CptCode which is true/flase depending on if the VisistID/Code (lowest level) is in the CptCode . IE "Flag_Visited_CptCodeNumber". Its a bit tricky, but first you can load a table with distinct CptCode values. Then you use a for-loop that goes goes through the list creats a variable which consists of if-statments you later call in your load. I made one a few weeks back. Could be made easier to follow but hopefully it gives a general idea of this approch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;negative_filter_page:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; Page&lt;BR /&gt; xxx&lt;BR /&gt; yyy&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;if noofrows('negative_filter_page')&amp;gt;0 then&lt;BR /&gt; let samesession='peek(#Visitor#)=Visitor and peek(#Time#)=Time and peek(#End time#)=[End time]';&lt;BR /&gt; let counter='0';&lt;BR /&gt; let peekpage=peek('Page','$(counter)','negative_filter_page');&lt;BR /&gt; let name_endstring='_flag_temp';&lt;BR /&gt; let name_desc_endstring='_flag';&lt;BR /&gt; let string=',if('&amp;amp;'$(samesession)'&amp;amp;',if(peek(#'&amp;amp;'$(peekpage)'&amp;amp;'$(name_endstring)'&amp;amp;'#)=#Visited#,#Visited#,if(#'&amp;amp;'$(peekpage)'&amp;amp;'#=Page,#Visited#,#Not Visited#)),if(#'&amp;amp;'$(peekpage)'&amp;amp;'#=Page,#Visited#,#Not Visited#)) as [' &amp;amp; '$(peekpage)'&amp;amp;'$(name_endstring)'&amp;amp;']';&lt;BR /&gt; let desc_string=',if('&amp;amp;'$(samesession)'&amp;amp;',if(peek(#' &amp;amp; '$(peekpage)'&amp;amp;'$(name_desc_endstring)'&amp;amp;'#)=#Visited#,#Visited#,#Not Visited#),if(['&amp;amp;'$(peekpage)'&amp;amp;'$(name_endstring)'&amp;amp;']=#Visited#,#Visited#,#Not Visited#)) as [' &amp;amp; '$(peekpage)'&amp;amp;'$(name_desc_endstring)'&amp;amp;']';&lt;BR /&gt; for counter=1 to noofrows('negative_filter_page')-1&lt;BR /&gt; let peekpage=peek('Page','$(counter)','negative_filter_page');&lt;BR /&gt; let string='$(string)'&amp;amp;',if('&amp;amp;'$(samesession)'&amp;amp;',if(peek(#'&amp;amp;'$(peekpage)'&amp;amp;'$(name_endstring)'&amp;amp;'#)=#Visited#,#Visited#,if(#'&amp;amp;'$(peekpage)'&amp;amp;'#=Page,#Visited#,#Not Visited#)),if(#'&amp;amp;'$(peekpage)'&amp;amp;'#=Page,#Visited#,#Not Visited#)) as [' &amp;amp; '$(peekpage)'&amp;amp;'$(name_endstring)'&amp;amp;']';&lt;BR /&gt; let desc_string='$(desc_string)'&amp;amp;',if('&amp;amp;'$(samesession)'&amp;amp;',if(peek(#' &amp;amp; '$(peekpage)'&amp;amp;'$(name_desc_endstring)'&amp;amp;'#)=#Visited#,#Visited#,#Not Visited#),if(['&amp;amp;'$(peekpage)'&amp;amp;'$(name_endstring)'&amp;amp;']=#Visited#,#Visited#,#Not Visited#)) as [' &amp;amp; '$(peekpage)'&amp;amp;'$(name_desc_endstring)'&amp;amp;']';&lt;BR /&gt; next&lt;BR /&gt; let negative_filter_strings = replace('$(string)','#',chr(39));&lt;BR /&gt; let negative_filter_desc_strings = replace('$(desc_string)','#',chr(39));&lt;BR /&gt;else&lt;BR /&gt; let negative_filter_strings='';&lt;BR /&gt;end if&lt;BR /&gt;&lt;BR /&gt;load&lt;BR /&gt;..................&lt;BR /&gt;$(negative_filter_strings)&lt;BR /&gt;resident ...;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Dec 2010 21:57:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-Excluded-How-to-Exclude-Records-Associated-With-Table/m-p/218045#M71215</guid>
      <dc:creator />
      <dc:date>2010-12-08T21:57:05Z</dc:date>
    </item>
    <item>
      <title>Select Excluded - How to Exclude Records Associated With Table Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Select-Excluded-How-to-Exclude-Records-Associated-With-Table/m-p/218046#M71216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As I understand it the Select Excluded doesn't work because of the many to one relationship.&lt;/P&gt;&lt;P&gt;So for example if select CptCode 'A' it will match to VisitID 55 and 27. But if I Select Exclude 'A' it will match to 55 and 38 because the 'C' that matches to 55 is not excluded. What I want is in the example is to only return 38.&lt;/P&gt;&lt;P&gt;CptCode | Code | VisitID&lt;/P&gt;&lt;P&gt;A | 1 | 55&lt;/P&gt;&lt;P&gt;C | 3 | 55&lt;/P&gt;&lt;P&gt;A | 1 | 27&lt;/P&gt;&lt;P&gt;B | 2 | 38&lt;/P&gt;&lt;P&gt;D | 4 | 38&lt;/P&gt;&lt;P&gt;E | 5 | 38&lt;/P&gt;&lt;P&gt;Your flag option seems plausible but it appears a bit too complicated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Dec 2010 16:02:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-Excluded-How-to-Exclude-Records-Associated-With-Table/m-p/218046#M71216</guid>
      <dc:creator />
      <dc:date>2010-12-09T16:02:30Z</dc:date>
    </item>
    <item>
      <title>Select Excluded - How to Exclude Records Associated With Table Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Select-Excluded-How-to-Exclude-Records-Associated-With-Table/m-p/218047#M71217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I am now trying to limit which CptCodes are allowed by adding a WHERE Clause on the ChargeSlipTable table. Obviously this doesn't get what I want because all case visits are returned regardless. Am I able to load a table that is a inner join between two tables? Can I add parameters to an existing join that QlikView creates?&lt;/P&gt;&lt;P&gt;ChargeSlipTable:&lt;BR /&gt;LOAD Code,&lt;BR /&gt; Visit As VisitID;&lt;BR /&gt;SQL SELECT Code,&lt;BR /&gt; SuperobjectID,&lt;BR /&gt; Visit&lt;BR /&gt;FROM WINDOPATH.dbo.ChargeSlipTable&lt;BR /&gt;WHERE Code NOT IN ('4020830','4020831','4020859','4020856');&lt;/P&gt;&lt;P&gt;CaseTable:&lt;BR /&gt;LOAD Number As Case,&lt;BR /&gt; Visit As VisitID;&lt;BR /&gt;SQL SELECT Number,&lt;BR /&gt; Visit&lt;BR /&gt;FROM WINDOPATH.dbo.CaseTable;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Dec 2010 20:29:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-Excluded-How-to-Exclude-Records-Associated-With-Table/m-p/218047#M71217</guid>
      <dc:creator />
      <dc:date>2010-12-09T20:29:12Z</dc:date>
    </item>
    <item>
      <title>Select Excluded - How to Exclude Records Associated With Table Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Select-Excluded-How-to-Exclude-Records-Associated-With-Table/m-p/218048#M71218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;" So for example if select CptCode 'A' it will match to VisitID 55 and 27. But if I Select Exclude 'A' it will match to 55 and 38 because the 'C' that matches to 55 is not excluded. What I want is in the example is to only return 38."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you start with selecting CPtCode value 'A' and then chose 'select excluded' in a VisitID field (a listbox does the work) you should get what you are looking for.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Dec 2010 22:57:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-Excluded-How-to-Exclude-Records-Associated-With-Table/m-p/218048#M71218</guid>
      <dc:creator />
      <dc:date>2010-12-09T22:57:53Z</dc:date>
    </item>
  </channel>
</rss>

