<?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 group by a partial string value in a field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-group-by-a-partial-string-value-in-a-field/m-p/869681#M654242</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;or You could try&lt;/P&gt;&lt;P&gt;T1:&lt;/P&gt;&lt;P&gt;Load * INLINE [&lt;/P&gt;&lt;P&gt;Order,Codes&lt;/P&gt;&lt;P&gt;1234,RGLI&lt;/P&gt;&lt;P&gt;1234,RGLI CR23&lt;/P&gt;&lt;P&gt;1234,CR23 6YZZ&lt;/P&gt;&lt;P&gt;5678,RGLI 6YZZ&lt;/P&gt;&lt;P&gt;5678,RGLI 6YZZ&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; Order,&lt;/P&gt;&lt;P&gt;&amp;nbsp; sum(WildMatch(Codes,'*RGLI*',1,0)) as [_rgli],&lt;/P&gt;&lt;P&gt;&amp;nbsp; sum(WildMatch(Codes,'*6YZZ*',1,0)) as [_6yzz],&lt;/P&gt;&lt;P&gt;&amp;nbsp; //sum(if(WildMatch(Codes,'*CR??*') and (not WildMatch(Codes,'*6YZZ*')),1,0)) as [_cr] &lt;/P&gt;&lt;P&gt;&amp;nbsp; sum(WildMatch(SubField(Codes,' ',1),'CR??',1,0)) as [_cr] &lt;/P&gt;&lt;P&gt;Resident T1 &lt;/P&gt;&lt;P&gt;Group by Order;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop Table T1;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Jul 2015 14:08:44 GMT</pubDate>
    <dc:creator>sasiparupudi1</dc:creator>
    <dc:date>2015-07-14T14:08:44Z</dc:date>
    <item>
      <title>How to group by a partial string value in a field</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-group-by-a-partial-string-value-in-a-field/m-p/869675#M654236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am have a field which can contain a number of codes.&amp;nbsp; The number of codes contained in the field changes and the contents also change.&amp;nbsp; The codes are always three or four characters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to be able to search within this field for the number of occurrances of a particular code and set a counter based on it.&amp;nbsp; I have been able to do this with unique 4 digit codes, but not when I want to find everything with a specific prefix, "CR" for example&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;&lt;STRONG&gt;Order&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Codes&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1234&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;RGLI&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1234&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;RGLI CR23&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1234&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;CR23 6YZZ&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;5678&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;RGLI 6YZZ&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;5678&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;RGLI 6YZZ&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the script I am trying is here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;LOAD &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Order, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; sum(WildMatch(Order,'*RGLI*',1,0)) as [_rgli],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; sum(WildMatch(&lt;STRONG style="font-size: 13.3333330154419px;"&gt;Order&lt;/STRONG&gt;,'*6YZZ*',1,0)) as [_6yzz],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; sum(WildMatch(&lt;STRONG style="font-size: 13.3333330154419px;"&gt;Order&lt;/STRONG&gt;,'*CR??*',1,0)) as [_cr],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff;"&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[data.xlsm]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(ooxml, embedded labels, table is data)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff;"&gt;Group by&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Order&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the output I want to have is:&lt;/P&gt;&lt;P&gt;1234 with _rgli value 2 _6yzz value 1 and _cr value 2&lt;/P&gt;&lt;P&gt;5678 with _rgli value 2 _6yzz value 2 and _cr value 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the only thing that does not work is the _cr value, I am not sure what the right syntax should be....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 13:22:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-group-by-a-partial-string-value-in-a-field/m-p/869675#M654236</guid>
      <dc:creator />
      <dc:date>2015-07-14T13:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to group by a partial string value in a field</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-group-by-a-partial-string-value-in-a-field/m-p/869676#M654237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum(WildMatch(&lt;/STRONG&gt;&lt;STRONG style="font-size: 13.33px;"&gt;Order,'*CR*',1,0)) as [_cr],&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 13:25:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-group-by-a-partial-string-value-in-a-field/m-p/869676#M654237</guid>
      <dc:creator>alexandros17</dc:creator>
      <dc:date>2015-07-14T13:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to group by a partial string value in a field</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-group-by-a-partial-string-value-in-a-field/m-p/869677#M654238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;the syntax should be &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; sum(WildMatch(&lt;STRONG style="font-style: inherit; font-size: 13.3333330154419px; font-family: inherit;"&gt;Order&lt;/STRONG&gt;,'*CR*',1,0)) as [_cr],&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 13:31:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-group-by-a-partial-string-value-in-a-field/m-p/869677#M654238</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2015-07-14T13:31:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to group by a partial string value in a field</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-group-by-a-partial-string-value-in-a-field/m-p/869678#M654239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please try&lt;/P&gt;&lt;P&gt; sum(if(WildMatch(Codes,'*CR??*') and (not WildMatch(Codes,'*6YZZ*')),1,0)) as [_cr] &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 13:55:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-group-by-a-partial-string-value-in-a-field/m-p/869678#M654239</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2015-07-14T13:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to group by a partial string value in a field</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-group-by-a-partial-string-value-in-a-field/m-p/869679#M654240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, that was what I tried first.&amp;nbsp; I should have mentioned that the CR has to be in the first position of the code.&amp;nbsp; the '*CR*' picks up all the CRs, including NOCR for example, which is not correct.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 14:02:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-group-by-a-partial-string-value-in-a-field/m-p/869679#M654240</guid>
      <dc:creator />
      <dc:date>2015-07-14T14:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to group by a partial string value in a field</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-group-by-a-partial-string-value-in-a-field/m-p/869680#M654241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure why anything works. What you need is something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(If(WildMatch(Codes,'*RGLI*'),1,0)) as [_rgli],&lt;/P&gt;&lt;P&gt;sum(If(WildMatch(Codes,'*6YZZ*'),1,0)) as [_6yzz],&lt;/P&gt;&lt;P&gt;sum(If(WildMatch(Codes,'*CR??*'),1,0)) as [_cr],&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 14:04:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-group-by-a-partial-string-value-in-a-field/m-p/869680#M654241</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-07-14T14:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to group by a partial string value in a field</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-group-by-a-partial-string-value-in-a-field/m-p/869681#M654242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;or You could try&lt;/P&gt;&lt;P&gt;T1:&lt;/P&gt;&lt;P&gt;Load * INLINE [&lt;/P&gt;&lt;P&gt;Order,Codes&lt;/P&gt;&lt;P&gt;1234,RGLI&lt;/P&gt;&lt;P&gt;1234,RGLI CR23&lt;/P&gt;&lt;P&gt;1234,CR23 6YZZ&lt;/P&gt;&lt;P&gt;5678,RGLI 6YZZ&lt;/P&gt;&lt;P&gt;5678,RGLI 6YZZ&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; Order,&lt;/P&gt;&lt;P&gt;&amp;nbsp; sum(WildMatch(Codes,'*RGLI*',1,0)) as [_rgli],&lt;/P&gt;&lt;P&gt;&amp;nbsp; sum(WildMatch(Codes,'*6YZZ*',1,0)) as [_6yzz],&lt;/P&gt;&lt;P&gt;&amp;nbsp; //sum(if(WildMatch(Codes,'*CR??*') and (not WildMatch(Codes,'*6YZZ*')),1,0)) as [_cr] &lt;/P&gt;&lt;P&gt;&amp;nbsp; sum(WildMatch(SubField(Codes,' ',1),'CR??',1,0)) as [_cr] &lt;/P&gt;&lt;P&gt;Resident T1 &lt;/P&gt;&lt;P&gt;Group by Order;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop Table T1;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 14:08:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-group-by-a-partial-string-value-in-a-field/m-p/869681#M654242</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2015-07-14T14:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to group by a partial string value in a field</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-group-by-a-partial-string-value-in-a-field/m-p/869682#M654243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Syntax of WildMatch:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WildMatch('&lt;EM&gt;string to search&lt;/EM&gt;', '&lt;EM&gt;search pattern1&lt;/EM&gt;', '&lt;EM&gt;search pattern2&lt;/EM&gt;', ....'&lt;EM&gt;search pattern n&lt;/EM&gt;')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have search pattern 2 = 1 and search pattern 3 = 0. Is that really what you want?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 14:53:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-group-by-a-partial-string-value-in-a-field/m-p/869682#M654243</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-07-14T14:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to group by a partial string value in a field</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-group-by-a-partial-string-value-in-a-field/m-p/869683#M654244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;nope, I thought it was the values that would be returned on true/false.&amp;nbsp; thanks for that!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 14:55:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-group-by-a-partial-string-value-in-a-field/m-p/869683#M654244</guid>
      <dc:creator />
      <dc:date>2015-07-14T14:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to group by a partial string value in a field</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-group-by-a-partial-string-value-in-a-field/m-p/869684#M654245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That works perfectly, thanks Jonathan.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 15:20:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-group-by-a-partial-string-value-in-a-field/m-p/869684#M654245</guid>
      <dc:creator />
      <dc:date>2015-07-14T15:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to group by a partial string value in a field</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-group-by-a-partial-string-value-in-a-field/m-p/869685#M654246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;maybe also possible:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;-Sum(Codes like 'CR*')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&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;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 20:07:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-group-by-a-partial-string-value-in-a-field/m-p/869685#M654246</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2015-07-14T20:07:27Z</dc:date>
    </item>
  </channel>
</rss>

