<?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 Counting if a text string appears in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Counting-if-a-text-string-appears/m-p/434103#M161821</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having a little troble in my script. I have the following example list of values in a field called "Campaign Type": &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sage Vendor, Microsoft Vendor, Digital Campaign, Pegasus Silo, Sage Silo (there are more but will serve for this) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want to do is create another field called "Campaign Group". The Campaign Group will be specified as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Anywhere&amp;nbsp; the word "Vendor" appears let Campaign Group = Vendor. &lt;/P&gt;&lt;P&gt;2. Anywhere the word "Silo" appears let Campaign Group = Silo&lt;/P&gt;&lt;P&gt;3. Anywhere the word "Digital" Appears let Campaign Group = Digital&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So each row is either a Vendor, Silo or Digital Campaign. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could do a lengthy IF statement for each campaign type but I have a few of them and more could be added. I'm happy for it to be an IF statement though if I can just group up the Campaign Types. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried a few things like substringcount but I can't seem to get anywhere so I was hoping for a push in the right direction. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Stu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Dec 2012 11:48:43 GMT</pubDate>
    <dc:creator>stuwannop</dc:creator>
    <dc:date>2012-12-13T11:48:43Z</dc:date>
    <item>
      <title>Counting if a text string appears</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-if-a-text-string-appears/m-p/434103#M161821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having a little troble in my script. I have the following example list of values in a field called "Campaign Type": &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sage Vendor, Microsoft Vendor, Digital Campaign, Pegasus Silo, Sage Silo (there are more but will serve for this) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want to do is create another field called "Campaign Group". The Campaign Group will be specified as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Anywhere&amp;nbsp; the word "Vendor" appears let Campaign Group = Vendor. &lt;/P&gt;&lt;P&gt;2. Anywhere the word "Silo" appears let Campaign Group = Silo&lt;/P&gt;&lt;P&gt;3. Anywhere the word "Digital" Appears let Campaign Group = Digital&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So each row is either a Vendor, Silo or Digital Campaign. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could do a lengthy IF statement for each campaign type but I have a few of them and more could be added. I'm happy for it to be an IF statement though if I can just group up the Campaign Types. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried a few things like substringcount but I can't seem to get anywhere so I was hoping for a push in the right direction. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Stu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2012 11:48:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-if-a-text-string-appears/m-p/434103#M161821</guid>
      <dc:creator>stuwannop</dc:creator>
      <dc:date>2012-12-13T11:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: Counting if a text string appears</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-if-a-text-string-appears/m-p/434104#M161822</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;In your script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Pick(WildMatch([Campaign Type], '*Vendor*', '*Silo*', '*Digital*')+1, 'Other', 'Vendor', 'Silo', 'Digital') &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as [Campaign Group]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2012 11:53:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-if-a-text-string-appears/m-p/434104#M161822</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2012-12-13T11:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: Counting if a text string appears</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-if-a-text-string-appears/m-p/434105#M161823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's great Jonathan thanks for such a quick response. I was going to ask you how that works as I didn't get the significance of the +1 but I've took it to bits and found the logic behind it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again. &lt;/P&gt;&lt;P&gt;Stu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2012 12:02:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-if-a-text-string-appears/m-p/434105#M161823</guid>
      <dc:creator>stuwannop</dc:creator>
      <dc:date>2012-12-13T12:02:49Z</dc:date>
    </item>
  </channel>
</rss>

