Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

issue regarding sub field

for example if i have a table like below

mobiles               features

i phone                 wifi,bluetooth,

blackberry             wifi,whatapp

moto                    hotspot,2gb ram

micromax             wifi,facebook

now i want to create a list box featuring only wifi

thanks in advance

3 Replies
Chanty4u
MVP
MVP

wifi.PNGHi,

Try below script

a:

LOAD * INLINE [

    mobiles, features

    i phone, wifi, bluetooth

    blackberry, wifi, whatapp

    moto, hotspot, 2gbram

    micromax, wifi, facebook

  

];

Result:

LOAD

mobiles,

subfield(features ,',') as fea

Resident a

Where features like 'wifi';

ishanbhatt
Creator II
Creator II


Hi Kenchala,


mobiles              features

i phone                wifi,bluetooth,

blackberry            wifi,whatapp

moto                    hotspot,2gb ram

micromax            wifi,facebook

now i want to create a list box featuring only wifi.

So you need to use Subfield function in Script.

Use below line in Script.

if(Subfield(Feature,',',1)='Wifi',Subfield(Feature,',',1),'')    AS  FieldName.

If you want to give any value where no wifi value found in the field then add value in the else part of the if condition.

Hopefully this'll work.

sasikanth
Master
Master

Try this in Listbox expression:

=if(wildmatch(features,'*wifi*'),mobiles)

script:

LOAD * INLINE [

    mobiles, features

    i phone, 'wifi, bluetooth'

    blackberry, 'wifi, whatapp'

    moto, 'hotspot, 2gbram'

    micromax, 'wifi, facebook'

];