<?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: How to set a new dimension in script based on string search in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-set-a-new-dimension-in-script-based-on-string-search/m-p/442416#M1151433</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;3. My idea was to create a new dimension in the script, containing "YES" in case of all records having "rebill" in the "Transaction text" sting, and "NO" for all the rest&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sounds like a good plan. Something like this should work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(substringcount([Transaction text],'rebill'),'Yes', 'No') as IsRebill&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Apr 2013 15:38:39 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2013-04-10T15:38:39Z</dc:date>
    <item>
      <title>How to set a new dimension in script based on string search</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-set-a-new-dimension-in-script-based-on-string-search/m-p/442415#M1151432</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 cant find any hint to the below, please could you help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FACTS:&lt;/P&gt;&lt;P&gt;- I have .csv files that I load to QV&lt;/P&gt;&lt;P&gt;- those files have the same structure, different data&lt;/P&gt;&lt;P&gt;- among the dimensions loaded, there is one called "Transaction text". It contains a string expression (mainly letters)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROBLEM:&lt;/P&gt;&lt;P&gt;1. I need to separate certain type of the transactions from all the rest (one transaction = one record or row in .csv file)&lt;/P&gt;&lt;P&gt;2. All of those that I need to separate contain "rebill" word in the "Transaction Text" string. None of those that I don't need to separate contains this word&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3. My idea was to create a new dimension in the script, containing "YES" in case of all records having "rebill" in the "Transaction text" sting, and "NO" for all the rest&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to write a proper function in the script, doing the job?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2013 14:56:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-set-a-new-dimension-in-script-based-on-string-search/m-p/442415#M1151432</guid>
      <dc:creator />
      <dc:date>2013-04-10T14:56:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a new dimension in script based on string search</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-set-a-new-dimension-in-script-based-on-string-search/m-p/442416#M1151433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;3. My idea was to create a new dimension in the script, containing "YES" in case of all records having "rebill" in the "Transaction text" sting, and "NO" for all the rest&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sounds like a good plan. Something like this should work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(substringcount([Transaction text],'rebill'),'Yes', 'No') as IsRebill&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2013 15:38:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-set-a-new-dimension-in-script-based-on-string-search/m-p/442416#M1151433</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-04-10T15:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a new dimension in script based on string search</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-set-a-new-dimension-in-script-based-on-string-search/m-p/442417#M1151434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I ammended your formula a little bit:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;if(substringcount([Transaction text]&amp;gt;0,'rebill'),'Yes', 'No') as IsRebill&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;a question - in &lt;EM style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Transaction text&lt;/EM&gt; the rebill part can have different capital letters / small letters combinations. Is it a way to avoid enumerating all of them?&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2013 19:05:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-set-a-new-dimension-in-script-based-on-string-search/m-p/442417#M1151434</guid>
      <dc:creator />
      <dc:date>2013-04-10T19:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a new dimension in script based on string search</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-set-a-new-dimension-in-script-based-on-string-search/m-p/442418#M1151436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually substringcount returns a number and any number other than zero is evaluated as True. So the &amp;gt;0 isn't really necessary. But making it explicit isn't a bad idea. I'm just a lazy dog &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;Try the wildmatch function instead. It does case-insensitive matching.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(wildmatch&lt;EM style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;([Transaction text]&lt;/EM&gt;,'*rebill*'),'Yes','No') as IsRebill&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2013 05:59:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-set-a-new-dimension-in-script-based-on-string-search/m-p/442418#M1151436</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-04-11T05:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a new dimension in script based on string search</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-set-a-new-dimension-in-script-based-on-string-search/m-p/442419#M1151438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot Gysbert for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont know why, but without This &amp;gt;0 the script did not work. Anyway the formuła jakieś its job now...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Apr 2013 21:17:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-set-a-new-dimension-in-script-based-on-string-search/m-p/442419#M1151438</guid>
      <dc:creator />
      <dc:date>2013-04-19T21:17:59Z</dc:date>
    </item>
  </channel>
</rss>

