Qlikview GetFieldSelections Multiple Selection -


i have list box selects distinct values (one of three) listbox.

this filters chart show bar chart based on sum totals.

currently, works when 1 value selected listbox, require chart work more 1 selection (i.e. 2 out of 3 or 3 out of three) syntax used doesn't work.

here line i'm using selection in chart properties, expression

sum ( {< bank_division = {'$(=getfieldselections(bu))'} >} amt_requested) 

i'm guessing connected getfieldselections method answers seem far suggest concatenation replacement, don't see how resolve requirement.

thanks help

to want should use expression

=chr(39)&concat(distinct fieldb,chr(39)&','&chr(39))&chr(39) 

and set analysis looks this

sum ( {< bank_division = {'$(=concat(distinct bu,chr(39)&','&chr(39)))'}>} >} amt_requested) 

as mentioned getfieldselections() function returns values '$(=getfieldselections(bu))' result in 'value1,value2' set analysis can't use. needs comma separated list single quotes each value not defining ends of list.

the concat function result in 'value1','value2'. chr(39) trick insert inverted commas output of expression rather have them act part of expression definition. distinct necessary because concat() returns every possible value unless tell bring unique values.

another reason use concat() rather getfieldselections() when nothing selected getfieldselections come undefined, concat returns list of possible values @ times, honouring other selections might limit list. behaves native qlikview engine.

that last statement why should think whether need in expression or if can let qlikview overhead, if need distinct long list potentially quite high program built on it's own anyway.

the time i've done when using if() causes data integrity issues because of complex data models , quick fix until went fix underlying data.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -