<?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 User Defined Groups Based on Wildmatch String function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/User-Defined-Groups-Based-on-Wildmatch-String-function/m-p/286646#M106656</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;I am wondering if it is possible for qlikview to define user groupings based on input. For example, right now the calculation is hardcoded something like:&lt;/P&gt;&lt;P&gt;IF(wildmatch(Description,'*a*','*b*'), 'P1',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(wildmatch(Description,'*c*','*d*'), 'P2', null()) as Priority&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I would like to happen if possible is to read the '*a*','*b*' list in from some external file that the user can maintain. I created a test excel file, that basically just has the label P1, and then two rows of data - a and b. My idea was to use Let to store the string in a variable and the concat function to mash the values together in a string as follows:&lt;/P&gt;&lt;P&gt;Let vRequestedTarget=chr(39)&amp;amp;'*'&amp;amp;concat(RequestedTargetKW,'*'&amp;amp;chr(39)&amp;amp;','&amp;amp;chr(39)&amp;amp;'*');&lt;/P&gt;&lt;P&gt;This throws an error though- "Aggregation expressions not allowed in GROUP BY clause" - so I think I am missing something there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The the expression would be like:&lt;/P&gt;&lt;P&gt;IF(wildmatch(Description,$vP1String), 'P1',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(wildmatch(Description,'*c*','*d*'), 'P2', null()) as Priority&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This last part doesn't really matter though, since I can't get the Let statement to work.&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 Jun 2011 12:26:43 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-06-14T12:26:43Z</dc:date>
    <item>
      <title>User Defined Groups Based on Wildmatch String function</title>
      <link>https://community.qlik.com/t5/QlikView/User-Defined-Groups-Based-on-Wildmatch-String-function/m-p/286646#M106656</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;I am wondering if it is possible for qlikview to define user groupings based on input. For example, right now the calculation is hardcoded something like:&lt;/P&gt;&lt;P&gt;IF(wildmatch(Description,'*a*','*b*'), 'P1',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(wildmatch(Description,'*c*','*d*'), 'P2', null()) as Priority&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I would like to happen if possible is to read the '*a*','*b*' list in from some external file that the user can maintain. I created a test excel file, that basically just has the label P1, and then two rows of data - a and b. My idea was to use Let to store the string in a variable and the concat function to mash the values together in a string as follows:&lt;/P&gt;&lt;P&gt;Let vRequestedTarget=chr(39)&amp;amp;'*'&amp;amp;concat(RequestedTargetKW,'*'&amp;amp;chr(39)&amp;amp;','&amp;amp;chr(39)&amp;amp;'*');&lt;/P&gt;&lt;P&gt;This throws an error though- "Aggregation expressions not allowed in GROUP BY clause" - so I think I am missing something there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The the expression would be like:&lt;/P&gt;&lt;P&gt;IF(wildmatch(Description,$vP1String), 'P1',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(wildmatch(Description,'*c*','*d*'), 'P2', null()) as Priority&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This last part doesn't really matter though, since I can't get the Let statement to work.&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 Jun 2011 12:26:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/User-Defined-Groups-Based-on-Wildmatch-String-function/m-p/286646#M106656</guid>
      <dc:creator />
      <dc:date>2011-06-14T12:26:43Z</dc:date>
    </item>
  </channel>
</rss>

