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: 
Anonymous
Not applicable

Get Value from Listbox in formula

Hi,

there is a Problem in Formula. Field ncc_focus should be have 'gross' or 'net', so that  '∑... ' have a value. I don't find what's wrong in this formula? ncc_focus cab be choose by a listbox.

sum ({<side_path={'$(vSitePath)'}, ncc_focus ={$(GetFieldSelections(ncc_focus, 'gross', 'net'))}> } cost_eur)

Regards

Stefan

6 Replies
swuehl
MVP
MVP

Try

sum ( { <site_path={'$(vSitePath)'}, ncc_focus = { $(=GetFieldSelections(ncc_focus))}  >} cost_eur)

manideep78
Partner - Specialist
Partner - Specialist

Hi

Please check the syntax of the 'GetFieldSelections()' function.

GetFieldSelections(1stparam,'2ndparam',3rdparam)

1stparam- field name - (ncc_focus in our case)

2ndparam- seperator-(eg. ',', ';', ':')

3rdparam- max values that we need(eg. 2,4,10) - default 6

please try below

=Sum({<site_path={'$(vSitePath)'}, ncc_focus={'$(=GetFieldSelections(ncc_focus))'}>}cost_eur)

hope this helps

Thanks

Manideep

Anonymous
Not applicable
Author

Thanks so lot. Resuce in emergency.

Stefan

sebastiandperei
Specialist
Specialist

If ncc_focus is data-related with cost_eur and site_path, you should only use:

sum ( { <site_path={'$(vSitePath)'} >} cost_eur)

But, if ncc_focus is dissconected, we need to know the app for make the expression right. Please, tell me that, and if was useful, you can mark as resolved, to my response or the last responses of my colleages.

Anonymous
Not applicable
Author

Hi,

thanks for your reply. Your right, ncc_focus is not nessary and i'm on a wrong way in this case. But, now i know, how can i get values from listboxes.

Stefan

sebastiandperei
Specialist
Specialist

You could use GetSelectedValues('field'), or concat (field,'separator'), but you need to know the format you need.

In this Set Analysis it wont work. Tell me where do you need it