Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
lprasanth
Contributor II
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

Labels (2)
3 Replies
pradosh_thakur
Master II
Master II

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

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

dplr-rn
Partner - Master III
Partner - Master III

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