<?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 Find text within a text in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Find-text-within-a-text/m-p/253165#M95967</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;What if I want to save this as a new variable, how can I do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So this is what I have in mind:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table1&lt;/P&gt;&lt;P&gt;sales_person&lt;/P&gt;&lt;P&gt;group1 (This column contains only Key Account and Inside Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table 2&lt;/P&gt;&lt;P&gt;sales_person&lt;/P&gt;&lt;P&gt;group2 (This column contains e.g. Inside Sales Germany and Key Account Manager Netherlands)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table 1 and Table 2 have different sales_person but what I want to create is one new table, Table 3 containing all sales_person and all group (but only with Key Account and Inside Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tell me if you dont understand what I mean and I will try to explain it better &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks ahead&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 May 2011 09:14:50 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-05-31T09:14:50Z</dc:date>
    <item>
      <title>Find text within a text</title>
      <link>https://community.qlik.com/t5/QlikView/Find-text-within-a-text/m-p/253162#M95964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need help finding text within a textfield.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is how it look like in the table;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inside Sales Germany&lt;/P&gt;&lt;P&gt;Inside Sales Netherlands&lt;/P&gt;&lt;P&gt;Integration Sales Germany&lt;/P&gt;&lt;P&gt;Key Account Manager Germany&lt;/P&gt;&lt;P&gt;Key Account Manager Netherlands&lt;/P&gt;&lt;P&gt;Key Account Manager Norway&lt;/P&gt;&lt;P&gt;Manager Inside Sales Netherlands&lt;/P&gt;&lt;P&gt;Manager Inside Sales Norway&lt;/P&gt;&lt;P&gt;Manager Key Account Netherlands&lt;/P&gt;&lt;P&gt;Partner Manager Germany&lt;/P&gt;&lt;P&gt;Senior Key Account Manager&lt;/P&gt;&lt;P&gt;Team Leader Inside Sales Germany&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to find all "Inside Sales" and put it in a separate table. Should I use subfield then?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks ahead!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2011 08:33:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-text-within-a-text/m-p/253162#M95964</guid>
      <dc:creator />
      <dc:date>2011-05-31T08:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: Find text within a text</title>
      <link>https://community.qlik.com/t5/QlikView/Find-text-within-a-text/m-p/253163#M95965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may use the 'index' function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An example is attached. Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2011 08:45:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-text-within-a-text/m-p/253163#M95965</guid>
      <dc:creator>nagaiank</dc:creator>
      <dc:date>2011-05-31T08:45:18Z</dc:date>
    </item>
    <item>
      <title>Find text within a text</title>
      <link>https://community.qlik.com/t5/QlikView/Find-text-within-a-text/m-p/253164#M95966</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;index() will do the job.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;something lik below (untested)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;newTable:&lt;/P&gt;&lt;P&gt;load *&lt;/P&gt;&lt;P&gt;from resident originalTable&lt;/P&gt;&lt;P&gt;where index(originalFieldHere,'Inside Sales')&amp;gt;0;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2011 08:50:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-text-within-a-text/m-p/253164#M95966</guid>
      <dc:creator>pat_agen</dc:creator>
      <dc:date>2011-05-31T08:50:21Z</dc:date>
    </item>
    <item>
      <title>Find text within a text</title>
      <link>https://community.qlik.com/t5/QlikView/Find-text-within-a-text/m-p/253165#M95967</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;What if I want to save this as a new variable, how can I do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So this is what I have in mind:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table1&lt;/P&gt;&lt;P&gt;sales_person&lt;/P&gt;&lt;P&gt;group1 (This column contains only Key Account and Inside Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table 2&lt;/P&gt;&lt;P&gt;sales_person&lt;/P&gt;&lt;P&gt;group2 (This column contains e.g. Inside Sales Germany and Key Account Manager Netherlands)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table 1 and Table 2 have different sales_person but what I want to create is one new table, Table 3 containing all sales_person and all group (but only with Key Account and Inside Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tell me if you dont understand what I mean and I will try to explain it better &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks ahead&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2011 09:14:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-text-within-a-text/m-p/253165#M95967</guid>
      <dc:creator />
      <dc:date>2011-05-31T09:14:50Z</dc:date>
    </item>
    <item>
      <title>Find text within a text</title>
      <link>https://community.qlik.com/t5/QlikView/Find-text-within-a-text/m-p/253166#M95968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; hi Fredrik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;no I am afraid this isn't very clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What information do you have to start with? - describe tables, fields and values. And what table do want to achieve? again describe fileds and values in those fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Better still - and this is always helpful - load a small qvw with some sample data. Makes everything clearer and will get you answers more rapidly&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2011 09:22:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-text-within-a-text/m-p/253166#M95968</guid>
      <dc:creator>pat_agen</dc:creator>
      <dc:date>2011-05-31T09:22:01Z</dc:date>
    </item>
    <item>
      <title>Find text within a text</title>
      <link>https://community.qlik.com/t5/QlikView/Find-text-within-a-text/m-p/253167#M95969</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;Okey I will try again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table_1&lt;/P&gt;&lt;P&gt;sales_person1 = [1,2,3]&lt;/P&gt;&lt;P&gt;group1 = ["Key Account", "Inside Sales", "Inside Sales"]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table_2&lt;/P&gt;&lt;P&gt;sales_person2 = [4,5,6]&lt;/P&gt;&lt;P&gt;group2 = ["Inside Sales Germany", "Manager Inside Sales Netherlands", "Senior Key Account Manager"]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result of these 2 tables should be like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table_3&lt;/P&gt;&lt;P&gt;sales_person = [1,2,3,4,5,6]&lt;/P&gt;&lt;P&gt;group = ["Key Account", "Inside Sales", "Inside Sales", "Inside Sales", "Inside Sales", "Key Account"]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the question is how I in Table 2 can get out only the name "Inside Sales" and "Key Account"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2011 09:46:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-text-within-a-text/m-p/253167#M95969</guid>
      <dc:creator />
      <dc:date>2011-05-31T09:46:17Z</dc:date>
    </item>
    <item>
      <title>Find text within a text</title>
      <link>https://community.qlik.com/t5/QlikView/Find-text-within-a-text/m-p/253168#M95970</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;I see your issue like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you want everything from table 1. You want added to this records from table 2 where the group includes the strings "Inside Sales" or "key Account". When geting the records from table 2 you want to replace the existing group value with either "Inside Sales" or "key Account".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this can be coded as follows - (we consider that you have already loaded table1 and table 2):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table_3:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;sales_person1 as sales_person,&lt;/P&gt;&lt;P&gt;group1 as [group]&lt;/P&gt;&lt;P&gt;resident table_1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table_3:&lt;/P&gt;&lt;P&gt;concatenate (Table_3) load&lt;/P&gt;&lt;P&gt;sales_person2 as sales_person,&lt;/P&gt;&lt;P&gt;if(index(group2,'Inside Sales')&amp;gt;0,'Inside Sales',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(index(group2,'Key Account')&amp;gt;0,'Key Account' )) as [group]&lt;/P&gt;&lt;P&gt;resident table_2&lt;/P&gt;&lt;P&gt;where index(group2,'Inside Sales')&amp;gt;0 or&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; index(group2,'Key Account')&amp;gt;0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;see if this works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2011 10:02:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-text-within-a-text/m-p/253168#M95970</guid>
      <dc:creator>pat_agen</dc:creator>
      <dc:date>2011-05-31T10:02:20Z</dc:date>
    </item>
  </channel>
</rss>

