Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Venkat7
Contributor
Contributor

Default selctions by using pick and match functions in qliksense load editor

I have an output like this Given below :

load * inline [

field name

potato

radius

beans

potato

carrot

mango

grapes

orange];

by using pick and match I want output like this ;

field name      category 

potato            vegetable

radius             vegetable

beans              vegetable

potato              vegetable

carrot              vegetable

mango           fruit

grapes           fruit

orange         fruit 

 here need to separate the groups by using pick and match   

please anybody help 

 

 

 

Labels (1)
1 Reply
steeefan
Luminary
Luminary

Where is the information stored that potato is a vegetable and mango a fruit? Looks like a case of ApplyMap() to me.

 

mapType:
MAPPING LOAD * INLINE [
  item, category
  potato, vegetable
  radius, vegetable
  mango, fruit
];

Basket:
LOAD
  *,
  ApplyMap('mapType', item) AS category;
LOAD * INLINE [
  item
  potato
  radius
  mango
];

 

Result:

steeefan_0-1714121617338.png

 

What are you trying to achieve in the end?