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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
kishorj1982
Creator II
Creator II

Moving complex expressions in qlikview script

Hi all,

PFA.

Can you please suggest how should i optimize the script.It is taking too much time to open the app in my origional app need to move complex calculations in back end.

I have attached reduced version now

Thanks

17 Replies
kishorj1982
Creator II
Creator II
Author

Hi all,

Can you please suggest on this.

Thanks

Anil_Babu_Samineni

I am not sure, Whether I can help you from your script. Script seems okay to me. May be delete comment rows then check and can we know the noofrows on your Fields

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
kishorj1982
Creator II
Creator II
Author

Hi,

I  am asking about chart expressions need to move some part in backend because chart performance is very slow.

Thanks

prieper
Master II
Master II

First: would place the calculated dimensions into the script.

Second: formatting is usually not necessary in the expression, but might be done under Properties->Number

Third: expressions with IF(Match(Flag....) are not necessary, you may also write SUM(Value) * (Flag....)

Fourth: your third expression is mixing aggregated with fixed values (one not part of the database) - please check

HTH Peter

kishorj1982
Creator II
Creator II
Author

Hi Thanks for your valuable response.

Can you please show me in my script.

Thanks

prieper
Master II
Master II

You had it nearly done in line 140:

Credit_Evaluation:

LOAD

    *,

    if(Match(CRD_Limit_Status, 'Over Credit Limit', 'Under Credit Limit'),    Cust#_Name)    AS Header1,

    if(Match(CRD_Limit_Status, 'Over Credit Limit'),    Cust#_Name)                        AS Header2;

LOAD

    *,

        ApplyMap('Credit_Eval_NAE_Map', CustomerNumber) as CRD_Limit_Status

Resident Credit_Evaluation_Temp;

Peter

kishorj1982
Creator II
Creator II
Author

Hi Peter,

Can you please suggest what will be the exrpession. I am bit confusing now.

Thanks

prieper
Master II
Master II

You had as expression:

if(Match(_Flag_LOB_0405, 1),Round(Sum(MBIA),0))

This can only be calculated, if there are dimensions sharing the same flag.

This would be a working formula:

SUM(IF(MATCH(_Flag_LOB_0405, 1), MBIA))

Faster would be

SUM(MBIA * _Flag_LOB_0405)

Similar with other expressions then.

Peter

kishorj1982
Creator II
Creator II
Author

Thanks peter for your valuable response.

Can you please suggest what would be the optimize expression for below,

if(Dimensionality () <>  0,

if(

Match(_Flag_LOB_010203, 1),

Round(CRD_Limit_USD - Sum(NAE) + Sum(TotalReserve_USD)),

//Round(CRD_Limit_USD - Aggr(Sum(NAE), CustomerNumber) + Aggr(Sum(TotalReserve_USD), CustomerNumber)),

if(

Match(_Flag_LOB_0405, 1),

Round(CRD_Limit_USD - $(vTotalOpenAR) - Sum(MBIA)),

Round(CRD_Limit_USD - $(vTotalOpenAR)

))

)