Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

ramya_beginner
Contributor

Calculated field in the script

Hi

I am trying to create a calculated field in the script , based on utilization ,

here is the logic

load

if("SPR_Quantity" > Counter and Counter <> 0 AND Counter >0 ,'Under',

if("SPR_Quantity" = Counter,'None',

if("SPR_Quantity" < Counter or Counter < 0 ,'Over',

if(Counter = 0 ,'All Used')

))) as Usage

I am able put the same logic in the chart but not in the script , I don't see "Over" SPR being filtered out correctly , can someone tell me why ?

Thanks

3 Replies
ramya_beginner
Contributor

Re: Calculated field in the script

Attached my document

MVP
MVP

Re: Calculated field in the script

Aren't you using the SPR.SPR_SUM_QTY field instead of the SPR.SPR_QUANTITY field in your chart expression?

ramya_beginner
Contributor

Re: Calculated field in the script

oops !! you are right SPR.SPR_Quantity is the field I have to use.