<?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: Comparing Text Strings in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Comparing-Text-Strings/m-p/818795#M662656</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am looking for just the presence of the string. For row 2, column B should only include either Stone and/or Rock. Wall Paper would not be allowed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Feb 2015 18:02:47 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-02-03T18:02:47Z</dc:date>
    <item>
      <title>Comparing Text Strings</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-Text-Strings/m-p/818792#M662651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As part of our data checks, I have a table like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Material Bought&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Material Used&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Brick; Stone; Mortar&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Brick&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Stone; Rock&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Rock; Wall Paper&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Brick, Pebbles&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Stone&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to ensure that what is in column B is also in column A.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the above example, row 1 is fine, but rows 2 and 3 are an issue. How can I compare these two fields for "likeness" without writing a bunch of if statements?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 17:20:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-Text-Strings/m-p/818792#M662651</guid>
      <dc:creator />
      <dc:date>2015-02-03T17:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Text Strings</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-Text-Strings/m-p/818793#M662652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in second you have also Rock string do you find the first or second position of the string or it just presence of the strings in the field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 17:51:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-Text-Strings/m-p/818793#M662652</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2015-02-03T17:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Text Strings</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-Text-Strings/m-p/818794#M662654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you want a "one-to-one" comparison? &lt;/P&gt;&lt;P&gt;Could you describe better your requirement, since "Brick" appears on first column, but what if have more values?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 18:01:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-Text-Strings/m-p/818794#M662654</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2015-02-03T18:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Text Strings</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-Text-Strings/m-p/818795#M662656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am looking for just the presence of the string. For row 2, column B should only include either Stone and/or Rock. Wall Paper would not be allowed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 18:02:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-Text-Strings/m-p/818795#M662656</guid>
      <dc:creator />
      <dc:date>2015-02-03T18:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Text Strings</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-Text-Strings/m-p/818796#M662658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would essentially like to write something like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF([Material Used] like [Material Bought],'Okay','Not Okay')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and this would evaluate the two to see if the string from Material Used is contained within Material Bought. I want to avoid having to write if statements containing all the possible values. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 18:07:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-Text-Strings/m-p/818796#M662658</guid>
      <dc:creator />
      <dc:date>2015-02-03T18:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Text Strings</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-Text-Strings/m-p/818797#M662659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Drew,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if I get you right, you have defined items, separated by a semicolon?&lt;BR /&gt;or is it undefined strings you want to compare like&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; border-image: none;"&gt;&lt;THEAD&gt;&lt;TR&gt;&lt;TH class="header" style="padding: 2px; border: 1px solid #000000; border-image: none; text-align: center; color: #ffffff; background-color: #6690bc;" valign="middle"&gt;Material Bought&lt;/TH&gt;&lt;TH class="header" style="padding: 2px; border: 1px solid #000000; border-image: none; text-align: center; color: #ffffff; background-color: #6690bc;" valign="middle"&gt;&lt;STRONG&gt;Material Used&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="padding: 2px; border: 1px solid #000000; border-image: none;"&gt;BrickStone; Mortar&lt;/TD&gt;&lt;TD style="padding: 2px; border: 1px solid #000000; border-image: none;"&gt;Bricks&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; border: 1px solid #000000; border-image: none;"&gt;Stone&lt;/TD&gt;&lt;TD style="padding: 2px; border: 1px solid #000000; border-image: none;"&gt;Cobblestone&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; border: 1px solid #000000; border-image: none;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px; border: 1px solid #000000; border-image: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That would make a different story, guess you would have to run loops on that. Ghastly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As long as you can split up the items using a defined separator (";") as given in your sample, you may want to extract data (using the subfield command) into two tables, one for column 1 and one for the other, each with an id for the line and a field for the text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data would look like this:&lt;/P&gt;&lt;P&gt;Original table:&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; border-image: none;"&gt;&lt;THEAD&gt;&lt;TR&gt;&lt;TH class="header" style="padding: 2px; border: 1px solid #000000; border-image: none; text-align: center; color: #ffffff; background-color: #6690bc;" valign="middle"&gt;Bought&lt;/TH&gt;&lt;TH class="header" style="padding: 2px; border: 1px solid #000000; border-image: none; text-align: center; color: #ffffff; background-color: #6690bc;" valign="middle"&gt;&lt;STRONG&gt;Used&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="padding: 2px; border: 1px solid #000000; border-image: none;"&gt;Brick; Mortar&lt;/TD&gt;&lt;TD style="padding: 2px; border: 1px solid #000000; border-image: none;"&gt;Brick&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; border: 1px solid #000000; border-image: none;"&gt;Stone&lt;/TD&gt;&lt;TD style="padding: 2px; border: 1px solid #000000; border-image: none;"&gt;Sand; Mortar&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; border: 1px solid #000000; border-image: none;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px; border: 1px solid #000000; border-image: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table_Bought:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; border-image: none;"&gt;&lt;THEAD&gt;&lt;TR&gt;&lt;TH class="header" style="padding: 2px; border: 1px solid #000000; border-image: none; text-align: center; color: #ffffff; background-color: #6690bc;" valign="middle"&gt;Line_ID&lt;/TH&gt;&lt;TH class="header" style="padding: 2px; border: 1px solid #000000; border-image: none; text-align: center; color: #ffffff; background-color: #6690bc;" valign="middle"&gt;&lt;STRONG&gt;item&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="padding: 2px; border: 1px solid #000000; border-image: none;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px; border: 1px solid #000000; border-image: none;"&gt;Brick&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; border: 1px solid #000000; border-image: none;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px; border: 1px solid #000000; border-image: none;"&gt;Mortar&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; border: 1px solid #000000; border-image: none;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px; border: 1px solid #000000; border-image: none;"&gt;Stone&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table_used:&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; border-image: none;"&gt;&lt;THEAD&gt;&lt;TR&gt;&lt;TH class="header" style="padding: 2px; border: 1px solid #000000; border-image: none; text-align: center; color: #ffffff; background-color: #6690bc;" valign="middle"&gt;Line_ID&lt;/TH&gt;&lt;TH class="header" style="padding: 2px; border: 1px solid #000000; border-image: none; text-align: center; color: #ffffff; background-color: #6690bc;" valign="middle"&gt;&lt;STRONG&gt;item&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="padding: 2px; border: 1px solid #000000; border-image: none;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px; border: 1px solid #000000; border-image: none;"&gt;Brick&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; border: 1px solid #000000; border-image: none;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px; border: 1px solid #000000; border-image: none;"&gt;Sand&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px; border: 1px solid #000000; border-image: none;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px; border: 1px solid #000000; border-image: none;"&gt;Mortar&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, grouped per line_id, you count matches of both fields, &lt;BR /&gt;here resulting in a sum of 1 for line_id 1 and 0 for line_id 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any line with &amp;gt;0 matches is what you are looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Presto.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would that help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Nov 2015 09:39:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-Text-Strings/m-p/818797#M662659</guid>
      <dc:creator />
      <dc:date>2015-11-18T09:39:34Z</dc:date>
    </item>
  </channel>
</rss>

