Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Comma Values in column


HI all,

I have a situation in which Applymap and simple widmatch is not working.I have a column which contains following data

col1          col2

1               Duplicate

2               required filed missing:abcd,Duplicate

3               required filed missing:abcd,pqrs,Duplicate           

4               required filed missing:xyz

5               Member Not found

Now in filter I want to show:

Duplicate

Required Field Missing

Member Not Found

Now On selecting :

Duplicate:: records 1,2,3 show.

Required Field Missing:: records 2,3,4 show

Member Not Found:: record 5 show.

I search lot about this,but not able achieve this.Please help regarding this.

1 Solution

Accepted Solutions
maxgro
MVP
MVP

Tab:

LOAD * INLINE [

col1      ,    col2

1       ,        "Duplicate"

2       ,        "required filed missing:abcd,Duplicate"

3       ,        "required filed missing:abcd,pqrs,Duplicate"         

4       ,        "required filed missing:xyz"

5       ,        "Member Not found"

];

Tab2:

LOAD col1, 'Required' as col3 Resident Tab where WildMatch(col2, '*required*');

LOAD col1, 'Duplicate' as col3 Resident Tab where WildMatch(col2, '*dupli*');

LOAD col1, 'Not Found' as col3 Resident Tab where WildMatch(col2, '*member not found*');

col3 is your listobox

View solution in original post

10 Replies
maxgro
MVP
MVP

Tab:

LOAD * INLINE [

col1      ,    col2

1       ,        "Duplicate"

2       ,        "required filed missing:abcd,Duplicate"

3       ,        "required filed missing:abcd,pqrs,Duplicate"         

4       ,        "required filed missing:xyz"

5       ,        "Member Not found"

];

Tab2:

LOAD col1, 'Required' as col3 Resident Tab where WildMatch(col2, '*required*');

LOAD col1, 'Duplicate' as col3 Resident Tab where WildMatch(col2, '*dupli*');

LOAD col1, 'Not Found' as col3 Resident Tab where WildMatch(col2, '*member not found*');

col3 is your listobox

martinpohl
Partner - Master
Partner - Master

use this:

Orig:

LOAD * INLINE [

col1      ,    col2

1 ,"Duplicate"

2 ,"required filed missing:abcd,Duplicate"

3 ,"required filed missing:abcd,pqrs,Duplicate"        

4 ,"required filed missing:xyz"

5 ,"Member Not found"

];

Data:

load

col1,

col2 as col2_orig,

left(col2,if(index(col2,':')= 0 ,len(col2),(index(col2,':'))-1)) as col2

resident Orig;

drop table Orig;

Not applicable
Author

Use subfield(col2, ',') first in a temp table => it will duplicate the lines (1 per field)

you will get 3 lines where col1 = 2

col1   col2

2     required field missing

2    abcd

2    Duplicate

After that you load into a new table with a wildmatch() function

where wildmatch(col2, 'required field match', 'Duplicate', 'member not found')

Fabrice

Not applicable
Author

Hey thanks for replying.But this code is not working.it is giving correct for Duplicates but on select of required filed ,it only gives those records which contains required field and not filtered out in duplicate filter.

Not applicable
Author

Thank you Massimo.It perfectly fine for my scenario.

Not applicable
Author


Thank you martin for reply.But this code doesnt not meet my requirement.It filters out all the values in col2 but I need only 3 category for filter,as I mentioned.

maxgro
MVP
MVP

if the answer was helpful or correct please marks it; thanks and regards

Not applicable
Author

How I can mark it?

maxgro
MVP
MVP

There should be a button with mark as helpful or mark as correct for every answer or in the thread