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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
suvechha_b
Creator III
Creator III

Need Help

How to write in expression :

My expression look like this :

if(name= 'Opening Stock On Hand', sum(opening_stock_unit),

if(name= 'Budget Recommended Order',sum(budget_recommended_order_quantity),

if(name= 'Recommended Order',sum(recommended_order),

if(name= 'Inbound Orders',sum(inbound_orders),

if(name= 'Actual Receipts', sum(purchase_receipts),

if(name= 'Adherence to plan(Factory)%',(sum(purchase_receipts)/sum(inbound_orders)*100),

if(name= 'Sales Budget Units',sum(sales_budget_units),

if(name= 'Sales Plan(Planner Forecast)',sum(sales_plan),

if(name= 'Actual Sales', sum(sale_units),

if(name= 'Customer Orders',sum(customer_order),

if(name= 'Adherence to Plan(MAPE3)%',RangeMax(0,100-fabs(sum(error))/Sum([actual])*100),

if(name= 'Adherence to Plan(ARITH1)%',(Sum([Actual Units])/Sum([Forecast Units])*100),

if(name= 'Model Stock Units', sum(model_stock_units),

if(name= 'Days On Hand',sum(days_on_hand),

if(name= 'Projected Adjustment',Sum(projected_adjustment_unit),

if(name= 'Closing Stock On Hand',sum([closing_stock_unit]),

if(name= 'Opening Stock on Hand Horizon Inbound Orders',Sum(OpeningStockOnHandHorizon),

if(name= 'Full Horizon Inbound Orders',Sum(FullHorizonInbounds),

if(name= 'Closing Stock on Hand Horizon Inbound Orders', Sum(ClosingStockOnHandHorizon),

if(name= 'RISK',RangeMin(0, $(vRisks)-$(vUnit)),Sum(qa_blocked_stock)))))))))))))))))))))

the RISK is not calculating .

how to get it right ??

14 Replies
Jason_Michaelides
Partner - Master II
Partner - Master II

Remove the $ symbols and test - still get the error?

suvechha_b
Creator III
Creator III
Author

please see the attachment..

Jason_Michaelides
Partner - Master II
Partner - Master II

Attach your qvw again please.

suvechha_b
Creator III
Creator III
Author

PFA

Jason_Michaelides
Partner - Master II
Partner - Master II

$(vRisks) is expanding within the script to your Aggr() function. This has square brackets around one or more field names - replace these with double-quotes and you should be good.  The closing square bracket ] is closing the Inline table too early.

Check $(vUnit) is not doing the same.