Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Greetings.
How do we decide when calculating a parameter is it better to go with the calculatiions in the UI or to go for doing the same in the script?
Are there any scenarios?
Kindly let me know whats the best practice so that it does not affect the performance of the application.
Thanks in advance
Regards
Senthil
I always try and back things off into the script.
Best Regards, Bill
If the calculations depend on the values selected, changed or entered by the user, they have to be done in the UI. In all other cases, it is preferable to do the calculations in the script for better performance. Even in cases where UI determines the result, it is better to identify which parts of the calculations are not dependent on user interaction and do them in the script so that on-the-fly calculations are kept to a minimum.
To add to the others, then it might be worth setting some "flags" in your LOAD script and then in your application do a SUM of these flags in order to calculate the result.
If you e.g. know that you always want to count the number of customers that have placed and order within the the last month, then you can add a "flag" in your LOAD script and set it to 1 if the customer has placed an order. In your application you can then add a SUM(FlagField) which will then give you the number of customers that have placed an order.This will put some of the calculations to the script, but of course ther will stille be cases where this isn't enough and you'll have to calculate things on the fly.RegardsSteenWhen I use set analysis, often I put some calculations in UI, otherwise all calculations go in script. But I don't believe that works for any qlikview user at despite this works for me.
Regards.