Hi,
We have used the below logic in qlik.
Is there any way to reduce the size of the exression.
Actually we have used more if conditions.I need to reduce the size of the expression to get performance.
if( sum({ @<[ Initiated]={1},[Conformed Location Code]={'Production'}>}[ Quantity])>0 and sum(TOTAL{ @< [Conformed Location Code]=,[Conformed Cause Code]=,[ Code Group]= , [Movement Type]={'Consumed'}>}[ Material Movement Count])<=0, 1000000,
if(sum({ @<[ Initiated]={1},[Conformed Location Code]={'Production'}>}[ Quantity])=0 and sum(TOTAL{ @< [Conformed Location Code]=,[Conformed Cause Code]=,[ Code Group]= , [Movement Type]={'Consumed'}>}[ Material Movement Count])<=0, 0,
if(num(round(sum({ @<[ Initiated]={1},[Conformed Location Code]={'Production'}>}[ Quantity])/ sum(TOTAL{ @< [Conformed Location Code]=,[Conformed Cause Code]=,[ Code Group]= , [Movement Type]={'Consumed'}>}[ Material Movement Count])*1000000),'###########,###') < 0, 0,
if(num(round(sum({ @<[ Initiated]={1},[Conformed Location Code]={'Production'}>}[Quantity])/ sum(TOTAL{ @< [Conformed Location Code]=,[Conformed Cause Code]=,[ Code Group]= , [Movement Type]={'Consumed'}>}[ Material Movement Count])*1000000),'###########,###') >1000000, 1000000,
num(round(sum({ @<[Initiated]={1},[Conformed Location Code]={'Production'}>}[Quantity])/ sum(TOTAL{ @< [Conformed Location Code]=,[Conformed Cause Code]=,[ Code Group]= , [Movement Type]={'Consumed'}>}[ Material Movement Count])*1000000),'###########,###')))))