Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

User Defined Groups Based on Wildmatch String function

Hi All,

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:

IF(wildmatch(Description,'*a*','*b*'), 'P1',

     IF(wildmatch(Description,'*c*','*d*'), 'P2', null()) as Priority

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:

Let vRequestedTarget=chr(39)&'*'&concat(RequestedTargetKW,'*'&chr(39)&','&chr(39)&'*');

This throws an error though- "Aggregation expressions not allowed in GROUP BY clause" - so I think I am missing something there.

The the expression would be like:

IF(wildmatch(Description,$vP1String), 'P1',

     IF(wildmatch(Description,'*c*','*d*'), 'P2', null()) as Priority

This last part doesn't really matter though, since I can't get the Let statement to work.

Any ideas?

0 Replies