<?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 Drop row if Substrings in Field A equals to Field B in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Drop-row-if-Substrings-in-Field-A-equals-to-Field-B/m-p/2464749#M99121</link>
    <description>&lt;P&gt;Hello!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Suppose I have these two rows&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;APPLE,ORANGE-&amp;gt;ORANGE&lt;/LI&gt;
&lt;LI&gt;APPLE-&amp;gt;ORANGE&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;I want to remove the first row from the table if the word after the arrow (i.e., orange) also appears before the arrow. The second row should be kept. There will always be one and only one word after the arrow. There might be up to 10 words before the arrow.&lt;/P&gt;</description>
    <pubDate>Sun, 23 Jun 2024 23:27:42 GMT</pubDate>
    <dc:creator>LiquidSword</dc:creator>
    <dc:date>2024-06-23T23:27:42Z</dc:date>
    <item>
      <title>Drop row if Substrings in Field A equals to Field B</title>
      <link>https://community.qlik.com/t5/App-Development/Drop-row-if-Substrings-in-Field-A-equals-to-Field-B/m-p/2464749#M99121</link>
      <description>&lt;P&gt;Hello!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Suppose I have these two rows&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;APPLE,ORANGE-&amp;gt;ORANGE&lt;/LI&gt;
&lt;LI&gt;APPLE-&amp;gt;ORANGE&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;I want to remove the first row from the table if the word after the arrow (i.e., orange) also appears before the arrow. The second row should be kept. There will always be one and only one word after the arrow. There might be up to 10 words before the arrow.&lt;/P&gt;</description>
      <pubDate>Sun, 23 Jun 2024 23:27:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Drop-row-if-Substrings-in-Field-A-equals-to-Field-B/m-p/2464749#M99121</guid>
      <dc:creator>LiquidSword</dc:creator>
      <dc:date>2024-06-23T23:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: Drop row if Substrings in Field A equals to Field B</title>
      <link>https://community.qlik.com/t5/App-Development/Drop-row-if-Substrings-in-Field-A-equals-to-Field-B/m-p/2464752#M99122</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/239390"&gt;@LiquidSword&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I have two solutions for that. One is smaller and easier to understand but there are some potential problems with it. The second solution is more complex but safe to use.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Solution 1&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The problem with this solution if you have something like:&lt;BR /&gt;APPLE,ORANGE-&amp;gt;ORANGE&lt;BR /&gt;APPLE-&amp;gt;ORANGE&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;APPLE_ORANGE,APPLE-&amp;gt;ORANGE *This record will be considered because it contains the word ORANGE. The complete term is APPLE_ORANGE but the SubStringCount ignores that. If that is your case, you have to use Solution 2.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;LOAD
    FullLine
WHERE
	SubStringCount(SubField(FullLine,'-&amp;gt;',1),SubField(FullLine,'-&amp;gt;',-1)) = 0
;
LOAD * INLINE [
FullLine
APPLE,ORANGE-&amp;gt;ORANGE
APPLE-&amp;gt;ORANGE
](delimiter is '|');&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Solution 2&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;LOAD
	FullLine
WHERE
	Match(FoundTermTotal,0)
;
LOAD
	FullLine,
    Sum(FoundTermCount) AS FoundTermTotal
GROUP BY
	FullLine
;
LOAD
	FullLine,
    Expression,
    SearchTerm,
    If(Match(Expression,SearchTerm),1,0) AS FoundTermCount
;
LOAD
    FullLine,
	SubField(SubField(FullLine,'-&amp;gt;',1),',') AS Expression,
    SubField(FullLine,'-&amp;gt;',-1) AS SearchTerm
;
LOAD * INLINE [
FullLine
APPLE,ORANGE-&amp;gt;ORANGE
APPLE-&amp;gt;ORANGE
](delimiter is '|');&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Mark Costa&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2024 00:28:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Drop-row-if-Substrings-in-Field-A-equals-to-Field-B/m-p/2464752#M99122</guid>
      <dc:creator>marksouzacosta</dc:creator>
      <dc:date>2024-06-24T00:28:26Z</dc:date>
    </item>
  </channel>
</rss>

