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: 
lalprasanth
Contributor
Contributor

writing set expression in load script


Hi guys,

  I need the following set expression to be written in the load script so that it get optimized 

Sum(
aggr( if(house_date=date(today()),sum({<ref_date={"$(=date(lastworkdate(today(),1)))"}>}Stock * $(vfilter5)),
RangeMax(sum({<idDate={1}>}aggr(stock_Forecast * $(vfilter5bis),key_OA))
-sum(aggr(avg_forecast* $(vfilter5bis) ,key_OA)),0)),[Nivpe 1 - Enseigne],LB_LEV_2,[Nivpe - Entrep],op_Forecast))

Could you please help me out on this..

Labels (3)
1 Reply
Gysbert_Wassenaar

You cannot use the Aggr function in the script and neither can you use set analysis expressions. You'll have to create tables to collect the values you need to calculate any results and intermediate results. If the variables you use contain expressions then you need to calculate those values first too, probably in more intermediate tables.


talk is cheap, supply exceeds demand