<?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: Finding invalid combinations of codes - one code without another in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Finding-invalid-combinations-of-codes-one-code-without-another/m-p/1695242#M594630</link>
    <description>&lt;P&gt;Interesting - thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 21 Apr 2020 12:56:47 GMT</pubDate>
    <dc:creator>nicktodd</dc:creator>
    <dc:date>2020-04-21T12:56:47Z</dc:date>
    <item>
      <title>Finding invalid combinations of codes - one code without another</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-invalid-combinations-of-codes-one-code-without-another/m-p/1641088#M594626</link>
      <description>&lt;P&gt;Consider the Codes table below. I want to find cases where there is an 'X' Code for an ID with no matching 'Y' Code (3 and 6 in this example). I can do it by creating a temporary table but I feel there is a more elegant solution that I'm missing.&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Codes:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;ID, Code&lt;BR /&gt;1, X&lt;BR /&gt;1, Y&lt;BR /&gt;1, X&lt;BR /&gt;2, X&lt;BR /&gt;2, Y&lt;BR /&gt;2, Z&lt;BR /&gt;3, X&lt;BR /&gt;3, Z&lt;BR /&gt;4, X&lt;BR /&gt;4, Y&lt;BR /&gt;4, Z&lt;BR /&gt;5, Y&lt;BR /&gt;6, X&lt;BR /&gt;7, A&lt;BR /&gt;8, B&lt;BR /&gt;9, C&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;Errors1:&lt;BR /&gt;LOAD ID, Code as C1&lt;BR /&gt;resident Codes&lt;BR /&gt;where Code = 'X';&lt;/P&gt;&lt;P&gt;LEFT JOIN&lt;BR /&gt;LOAD ID, Code as C2&lt;BR /&gt;resident Codes&lt;BR /&gt;Where Code = 'Y';&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;Errors:&lt;BR /&gt;LOAD 'X no Y' as Error, ID&lt;BR /&gt;resident Errors1&lt;BR /&gt;where C1 = 'X' and IsNull(C2);&lt;/P&gt;&lt;P&gt;DROP table Errors1;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2019 08:19:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-invalid-combinations-of-codes-one-code-without-another/m-p/1641088#M594626</guid>
      <dc:creator>nicktodd</dc:creator>
      <dc:date>2019-10-30T08:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: Finding invalid combinations of codes - one code without another</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-invalid-combinations-of-codes-one-code-without-another/m-p/1695085#M594628</link>
      <description>&lt;P&gt;One solution is:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Codes:
LOAD [ID], If(Index(Concat(DISTINCT Code),'X')&amp;gt;0 And Index(Concat(DISTINCT Code),'Y')=0,'Y') As Flag
Group By [ID]
;
LOAD * INLINE [
ID, Code
1, X
1, Y
1, X
2, X
2, Y
2, Z
3, X
3, Z
4, X
4, Y
4, Z
5, Y
6, X
7, A
8, B
9, C
];&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="commQV05.PNG" style="width: 84px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/32161i6504A0AC7210F581/image-size/large?v=v2&amp;amp;px=999" role="button" title="commQV05.PNG" alt="commQV05.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2020 03:18:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-invalid-combinations-of-codes-one-code-without-another/m-p/1695085#M594628</guid>
      <dc:creator>Saravanan_Desingh</dc:creator>
      <dc:date>2020-04-21T03:18:11Z</dc:date>
    </item>
    <item>
      <title>Re: Finding invalid combinations of codes - one code without another</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-invalid-combinations-of-codes-one-code-without-another/m-p/1695242#M594630</link>
      <description>&lt;P&gt;Interesting - thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2020 12:56:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-invalid-combinations-of-codes-one-code-without-another/m-p/1695242#M594630</guid>
      <dc:creator>nicktodd</dc:creator>
      <dc:date>2020-04-21T12:56:47Z</dc:date>
    </item>
  </channel>
</rss>

