Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.


Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Optimize IF Statement

Is there a better way to right this IF Statement? This load currently takes 40 minutes on 10 Millions records.



*, IF(sum(InBandwidth)+sum(OutBandwidth)=0,0,

IF(sum(InBandwidth)=0,sum(OutBandwidth/OutBandwidth) * 100,

IF(sum(OutBandwidth),(sum(In_Averagebps)/sum(InBandwidth)) * 100,

sum(Out_Averagebps/OutBandwidth)+sum(In_Averagebps/InBandwidth)*50))) AS AVERAGE_of_CircuitUtil_AvgRecvXmit2

RESIDENT InterfaceTrafficDetailTemp

GROUP BY InterfaceID, NodeID,In_Averagebps,Out_Averagebps,InBandwidth,OutBandwidth,InterfaceName,BandwidthandCircuit;

Tags (2)
1 Reply
Not applicable

Re: Optimize IF Statement


This is not what you are asking exactly, but just another idea:

Did you try storing the resident InterfaceTrafficDetailTemp table into a qvd file, and then load the InterfaceTraffic1 table from the qvd file?