Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

stefan_fischer
New Contributor II

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
MVP
MVP

Re: Get Value from Listbox in formula

Try

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

manideep78
Valued Contributor

Re: Get Value from Listbox in formula

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

stefan_fischer
New Contributor II

Re: Re: Get Value from Listbox in formula

Thanks so lot. Resuce in emergency.

Stefan

sebastiandperei
Valued Contributor

Re: Get Value from Listbox in formula

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.

stefan_fischer
New Contributor II

Re: Re: Get Value from Listbox in formula

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
Valued Contributor

Re: Get Value from Listbox in formula

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

Community Browser