Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

extract data from column

Hi all,

I have a scenario in my application. I have name of person and profession. I have few persons with multiple professions.

For example i have ram( teacher, cricketer) , james(politician,bishop), roni(it, cricketer).

I want to create a filter for profession with options cricketer and non cricketer. I am using if condition at the backend as if (profession =' cricket' , cricket ,non cricket) as profession1.

Now while i am selecting filter as cricketer it is not working for ram, roni etc. for non cricketer it is working

How can i handle this situation in a dynmic way.

4 Replies
Not applicable
Author

Try to see if GENERIC LOAD could suit you.

GENERIC is a prefix that will split a single table into several ones, in a dynamic way.

Fabrice

Not applicable
Author

generic load is useful in such situation

IAMDV
Luminary Alumni
Luminary Alumni

Hi Vitul,

You can solve this by using SubStringCount() and IF statement. Here is the sample code and attached QVW.

LOAD * INLINE [
    Name, Profession
    Ram, Cricketer
    Ram, Teacher
    James, Politician   
    James, Bishop
    Roni, IT
    Roni, Cricketer 
]
;

NoConcatenate

Final:
LOAD *,
IF(SubStringCount(Name & Profession, 'Cricketer') > 0, 'Cricketer', 'Non-Cricketer') AS Is_Cricketer
Resident Temp;

Drop table Temp;

Cheers,

DV

maxgro
MVP
MVP

what about a led check boxes listbox with this expression?

=if(wildmatch(aggr(concat(Profession, ', '), Name), '*Cricke*') , 'YES CRICKETER', 'NO CRICKETER') 

I used Deepak (thanks) data