Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
userid128223
Creator
Creator

what calculation can you move in script and what cannot

I have general question regarding qv app development.

I hear that you can move calculations in load script vs doing it in chart. What are pros and cons of doing that. Can you share a simple example. What will I lose by doing calculation in load script vs not doing it in chart.

Performance wise does IF statement works better then set analysis. Whats the performance impact of one vs other.

3 Replies
MK_QSL
MVP
MVP

Calculation made in Script are taking more time to load/reload the apps but giving better performance and flexibility compare to calculations made in UI end.

Set Analysis is not supported at Script end so need to stick with If under script but performance of Set Analysis is better than If Statement.

Can't provide you any specific file/apps at this stage as the impact of performance will take place for large data set.

Hope someone can provide better example...

chiru_thota
Specialist
Specialist

Comples Dimensions and Expressions.jpg

MarcoWedel

Hi dd dddd,

doing calculations in script level does not necessarily lead to more flexibility in the visualization, e.g. if you would calculate sums over one dimension in script level, using those sums in the visualization would lack the possibility to filter other dimensions and to see, in what way this affects the summed values.

On the other hand the calculation of week, month, quarter and year out of a given date on script level (i.e. creating independent fields for these periods of time) enables you to filter these periods independently. If you would instead create listboxes with these periods as calculated dimensions, selecting in one of these boxes would clear all selections in the others.

So as always, the answer is "it depends".

hope this helps

regards

Marco