Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
lprasanth
New Contributor II

IF expression with variable isn't working as expected

if(encours_date_forescast='$(vpop1)',encours_qte_forescast ) as newone1, and the variable value is

LET vpop1 ='=only({<idDateStkP={1}>}[date stock projection])';

when i use newone1 in the chart expression, the value isn't coming as expected. chart expression is given below

aggr(sum(newone1 * $(vfilter5)))

can you guys help to find a solution on this one

Tags (1)
3 Replies
pradosh_thakur
Honored Contributor II

Re: IF expression with variable isn't working as expected

not sure you can use set analysis in such a way in script.
Learning never stops.

Re: IF expression with variable isn't working as expected

There are multiple moving parts in your example... are you able to share a sample to show what you have and trying to achieve? May be there is a better way to program this

Partner
Partner

Re: IF expression with variable isn't working as expected

Set analysis cannot be used in script.
as sunny says not knowing your scenario difficult to help properly
but on face value, i would say you will need to use peek function (and possibly some sort of resident load with a where condition idDateStkP=1 ) to load the variable